Home | 简体中文 | 繁体中文 | 杂文 | 知乎专栏 | 51CTO学院 | CSDN程序员研修院 | Github | OSChina 博客 | 腾讯云社区 | 阿里云栖社区 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏多维度架构

Netkiller Cryptography 手札

信息安全与加密

Mr. Neo Chan, 陈景峰(BG7NYT)


中国广东省深圳市宝安区龙华镇溪山美地
518109
+86 13113668890
+86 755 29812080

$Id: book.xml 659 2013-08-09 10:01:31Z netkiller $

电子书最近一次更新于 2021-12-11 19:13:08

版权声明

转载请与作者联系,转载时请务必标明文章原始出处和作者信息及本声明。

http://www.netkiller.cn
http://netkiller.github.io
http://netkiller.sourceforge.net
微信公众号: netkiller
微信:13113668890 请注明“读者”
QQ:13721218 请注明“读者”
QQ群:128659835 请注明“读者”
知乎专栏 | 多维度架构

$Date: 2013-08-09 18:01:31 +0800 (Fri, 09 Aug 2013) $

内容摘要

Netkiller 系列手札 已经被 Github 收录,并备份保存在北极地下250米深的代码库中,备份会保留1000年。

Preserving open source software for future generations

The world is powered by open source software. It is a hidden cornerstone of modern civilization, and the shared heritage of all humanity.

The GitHub Arctic Code Vault is a data repository preserved in the Arctic World Archive (AWA), a very-long-term archival facility 250 meters deep in the permafrost of an Arctic mountain.

We are collaborating with the Bodleian Library in Oxford, the Bibliotheca Alexandrina in Egypt, and Stanford Libraries in California to store copies of 17,000 of GitHub’s most popular and most-depended-upon projects—open source’s “greatest hits”—in their archives, in museum-quality cases, to preserve them for future generations.

我们正在与牛津的博德利安图书馆、埃及的亚历山大图书馆和加利福尼亚州的斯坦福图书馆合作,将 GitHub 最受欢迎和最依赖的项目 17,000 份副本保存在他们的档案中,在博物馆质量的案例中,为子孙后代保存这些作品。

https://archiveprogram.github.com/arctic-vault/

我的系列文档:

Netkiller Linux 手札 Netkiller FreeBSD 手札 Netkiller Shell 手札 Netkiller Security 手札
Netkiller Web 手札 Netkiller Monitoring 手札 Netkiller Storage 手札 Netkiller Mail 手札
Netkiller Virtualization 手札 Netkiller Cryptography 手札   

以下文档停止更新合并到 《Netkiller Linux 手札》

Netkiller Debian 手札 Netkiller CentOS 手札 Netkiller Multimedia 手札    

为什么写这篇文章

有很多想法,不能实现.工作中也用不到,所以想写出来,和大家分享.有一点写一点,写得也不好,就当学习笔记了.

我想到那写到那,你会发现文章没一个中心,今天这里写点,明天跳过本章写其它的.
文中例子决对多,对喜欢复制然后粘贴朋友很有用,不用动手写,也省时间.
理论的东西,网上大把,我这里就不写了,需要可以去网上查.
我爱写错别字,还有一些是打错的,如果发现请指正.
另外本文98%是我亲自编写,另有小部分来自引用网上,但作者不详.

致读者

Netkiller 系列手札 已经被 Github 收录,并备份保存在北极地下250米深的代码库中,备份会保留1000年。

Preserving open source software for future generations

The world is powered by open source software. It is a hidden cornerstone of modern civilization, and the shared heritage of all humanity.

The GitHub Arctic Code Vault is a data repository preserved in the Arctic World Archive (AWA), a very-long-term archival facility 250 meters deep in the permafrost of an Arctic mountain.

We are collaborating with the Bodleian Library in Oxford, the Bibliotheca Alexandrina in Egypt, and Stanford Libraries in California to store copies of 17,000 of GitHub’s most popular and most-depended-upon projects—open source’s “greatest hits”—in their archives, in museum-quality cases, to preserve them for future generations.

https://archiveprogram.github.com/arctic-vault/

目录

1. 自述
1.1. 读者对象
1.2. 内容简介
1.3. 作者简介
1. UUID (Universally Unique Identifier)
1.1. GUID
1.2. Subversion
1.3. PHP UUID
1.4. JAVA UUID
1.5. PERL UUID
1.6. Python UUID
1.7. MySQL uuid()
1.8. linux command uuid
2. Encode & Decode
2.1. MIME (BASE64) 专题
2.1.1. Linux Command base64
2.1.2. PHP Base64
2.1.2.1. base64_encode
2.1.2.2. base64_decode
2.1.3. Python Base64
2.1.4. perl base64
2.1.5. Java Base64
2.1.5.1. Java 7
2.1.5.2. Java 8
2.1.6. C/C++ Base64
2.2. Uuencode
2.2.1. PHP uuencode
2.3. Quoted-Printable
2.3.1. C Quoted-Printable
2.3.2. Java Quoted-Printable
2.3.3. Python Quoted-Printable
2.4. Base58
2.4.1. php
2.4.2. Java Base58
3. Message Digest (数字摘要)
3.1. MD5专题
3.1.1. md5sum
3.1.2. PHP md5()
3.1.3. MySQL md5()
3.1.4. Java MD5
3.1.4.1. JDK 1.2
3.1.4.2. JDK 1.5
3.1.4.3. JDK 1.8
3.1.5. perl md5
3.2. SHA 专题
3.2.1. sha1sum
3.2.2. PHP sha1()
3.2.3. Java SHA
3.2.3.1. SHA
3.2.3.2. SHA-256
3.2.4. Perl
3.3. CRC32
3.3.1. PHP CRC32
3.3.2. Java CRC32
3.4. 第三方工具
3.4.1. htpasswd
3.4.1.1. CRYPT
3.4.1.2. MD5
3.4.1.3. SHA
3.4.2. htdigest
3.4.3. md5sum
3.4.4. sha1sum
4. DES crypt() 专题
4.1. C crypt()
4.2. PHP crypt()
4.3. perl crypt
4.4. mysql crypt
4.5. Java crypt
4.5.1. Java 8 DES
4.6. grub-md5-crypt - Encrypt a password in MD5 format.
5. AES
5.1. Java
5.1.1. AES/ECB/PKCS5Padding
5.1.2. AES/CBC/PKCS5PADDING
5.2. PHP
5.2.1. AES/ECB/PKCS5Padding
5.2.1.1.
6. GnuPG
6.1. 安装 GnuPG
6.1.1. CentOS 8 Stream
6.1.2. Ubuntu
6.1.3. macOS
6.2. 创建密钥
6.2.1. 创建密钥并指定过期时间
6.2.2. 快速创建密钥对
6.3. 查看密钥
6.4. 吊销密钥
6.5. 删除密钥
6.6. 密钥倒入/导出
6.6.1. 导出密钥
6.6.1.1. 导出所有公钥
6.6.1.2. 导出公钥到指定文件
6.6.1.3. 导出私钥
6.6.2. 导入密钥
6.6.3. 导入所有密钥
6.6.4. 密钥迁移
6.7. 签名
6.8. 加密/解密文件
6.8.1. 加密文件
6.8.2. 解密
6.8.3. 指定用户ID
6.8.4. 签名+加密
6.9. 修改密钥
6.9.1. 显示帮助信息
6.9.2. 签名
6.9.3. 公钥信任配置
6.10. 加密备份 MySQL
6.10.1. 创建密钥对
6.10.2. 数据库备份
6.10.3. 数据库还原
6.11. FAQ
6.11.1. 指定 passphrase
6.11.2. 旧版本 1.4.11
6.11.2.1. GnuPG
6.11.2.2. Creating a key (创建key)
6.11.2.3. --list-keys 列出已存在的证书
6.11.2.4. Exporting keys (导出key)
6.11.2.4.1. --export export keys
6.11.2.4.2. -o, --output use as output file
6.11.2.5. Importing keys (导入key)
6.11.2.6. Revoke a key (吊销key)
6.12. GnuPG For Windows
6.12.1. 生成密钥对
6.12.2. 列出密钥
6.12.3. 验证签字
6.12.4. EMail-Security
6.13. Smart Card
6.14. PGP
6.15. OpenPGP
7. OpenSSL
7.1. openssl 命令参数
7.1.1. version
7.1.2. 测试加密算法的速度
7.1.3. req
7.1.4. x509
7.1.5. ca
7.1.6. crl
7.1.7. pkcs12
7.1.8. passwd
7.1.9. digest
7.1.9.1. list-message-digest-commands
7.1.9.2. md5
7.1.9.3. sha1
7.1.10. enc
7.1.10.1. list-cipher-commands
7.1.10.2. base64
7.1.10.3. des
7.1.10.4. aes
7.1.11. rsa
7.1.12. dsa
7.1.13. rc4
7.1.14. -config 指定配置文件
7.1.15. -subj 指定参数
7.1.16. rand
7.1.17. 去除私钥的密码
7.1.18. ciphers
7.2. web 服务器 ssl 证书
7.2.1. Nginx
7.2.1.1. Nginx + Tomcat (HTTP2)
7.3. s_server / s_client
7.3.1. SSL POP3 / SMTP / IMAP
7.3.2. server / client 文件传输
7.3.3. HTTP SSL 证书
7.3.3.1. 证书链
7.3.3.2. 显示证书
7.3.3.3. 指定 servername
7.4. smime
7.5. Outlook smime x509 证书
7.5.1. 快速创建自签名证书
7.5.2. 企业或集团方案
7.5.2.1. 证书环境
7.5.2.2. 颁发CA证书
7.5.2.3. 颁发客户证书
7.5.2.4. 吊销已签发的证书
7.6. 证书转换
7.6.1. CA证书
7.6.2. 创建CA证书有效期为一年
7.6.3. x509转换为pfx
7.6.4. PEM格式的ca.key转换为Microsoft可以识别的pvk格式
7.6.5. PKCS#12 到 PEM 的转换
7.6.6. 从 PFX 格式文件中提取私钥格式文件 (.key)
7.6.7. 转换 pem 到到 spc
7.6.8. PEM 到 PKCS#12 的转换
7.6.9. How to Convert PFX Certificate to PEM Format for SOAP
7.6.10. DER文件(.crt .cer .der)转为PEM格式文件
7.6.11. JKS 转 X509
7.6.12. jks to pem
7.7. 其他证书工具
7.8. OpenSSL 开发库
7.8.1. DES encryption with OpenSSL
8. 数据库与加密
8.1. MySQL 加密函数
8.1.1. AES_ENCRYPT / AES_DECRYPT
8.1.2. 通过PHP mcrypt 函数加密解密MySQL数据库
9. Java - keytool
9.1. 创建证书
9.2. Private key generation
9.3. Public Key Certificate (optional)
9.4. import your signed certificate
9.5. Import the certificate and attach it to your server key pair
9.6. Key pair verification
10. .Net makecert
10.1. 访问X.509证书
11. Secure Tunnel
11.1. OpenSSH Tunnel
11.1.1. SOCKS v5 Tunnel
11.2. SSL Tunnel
11.2.1. 通过SSL访问POP、IMAP、SMTP
11.3. DeleGate
12. 硬盘分区与文件系统加密
12.1. Microsoft 文件系统加密
12.1.1. Microsoft Encrypting File System (EFS)
12.1.2. BitLocker
13. Office
13.1. 给文档加密码
13.2. 数字签名
13.3. Email Security using OpenPGP and S/MIME
13.3.1. Gpg4win
13.3.2. S/MIME
14. OpenStego - 图像文件水印加密
15. 数字证书开发
15.1. Java (java.security.*)
15.1.1. 访问X.509证书
15.1.2. 创建证书
15.2. SSL Socket
15.2.1. Java Socket HTTPS
15.2.2. Java SSL Socket Client
15.2.3. Java SSL Socket Server
16. Smart card(智能卡)
16.1. OpenSC - tools and libraries for smart cards
16.1.1. 安装 OpenSC
16.2. openct-tool - OpenCT smart card utility
16.3. ccid - Generic USB CCID smart card reader driver
16.4. usbutils: Linux USB utilities
16.5. USB Token
16.5.1. Open[F]irst
16.5.2. [S]oPin 验证管理员
16.5.3. LED 灯控制
16.5.4. [L]ist
16.5.5. File[M]enu 文件菜单
16.5.5.1. [L]ist 列目录与文件
16.5.5.2. 目录管理
16.5.5.2.1. 创建目录
16.5.5.2.2. C[h]Dir 进入目录
16.5.5.2.3. 删除目录 DelD[i]r
16.5.5.3. 文件管理
16.5.5.3.1. Create[F]ile 创建文件
16.5.5.3.2. [O]pen 打开文件
16.5.5.3.3. D[e]leteFile 删除文件
16.5.5.4. Create[A]pp 创建GUID
16.5.6. Set[u]pMenu 设置菜单
16.5.6.1. 修改pin
16.5.6.2. [T]okenName 修改Token名字
16.5.6.3. [C]leanup
16.5.6.4. [U]lockPIN
16.5.6.5. [A]ccessSettings
16.5.6.6. [I]nitToken 初始化
16.5.7. Linux ePass
17. Credentials Organization
17.1. VeriSign
17.1.1. iTrusChina
17.1.2. Thawte
17.1.3. Geotrust
17.2. UserTrust
17.3. 境内其他CA机构
17.3.1. WoSign®、I'm Verified®、WoTrust®、沃通®
17.4. SSL FOR FREE
17.5. Let’s Encrypt

范例清单

7.1. dsaparam & gendsa
7.2. 加密传输文件
7.3. 快速创建自签名证书
7.4. 创建CA根证书
7.5. 创建自签名的证书
7.6. DES encryption example in C
11.1. stunnel.conf