/* default css */ table { font-size: 1em; line-height: inherit; } tr { text-align: left; } div, address, ol, ul, li, option, select { margin-top: 0px; margin-bottom: 0px; } p { margin: 0px; } body { margin: 6px; padding: 0px; font-family: Verdana, sans-serif; font-size: 10pt; background-color: #ffffff; } img { -moz-force-broken-image-icon: 1; } @media screen { html.pageview { background-color: #f3f3f3 !important; } body { min-height: 1100px; counter-reset: __goog_page__; } * html body { height: 1100px; } .pageview body { border-top: 1px solid #ccc; border-left: 1px solid #ccc; border-right: 2px solid #bbb; border-bottom: 2px solid #bbb; width: 648px !important; margin: 15px auto 25px; padding: 40px 50px; } /* IE6 */ * html { overflow-y: scroll; } * html.pageview body { overflow-x: auto; } /* Prevent repaint errors when scrolling in Safari. This "Star-7" css hack targets Safari 3.1, but not WebKit nightlies and presumably Safari 4. That's OK because this bug is fixed in WebKit nightlies/Safari 4 :-). */ html*#wys_frame::before { content: '/A0'; position: fixed; overflow: hidden; width: 0; height: 0; top: 0; left: 0; } .writely-callout-data { display: none; *display: inline-block; *width: 0; *height: 0; *overflow: hidden; } .writely-footnote-marker { background-image: url('MISSING'); background-color: transparent; background-repeat: no-repeat; width: 7px; overflow: hidden; height: 16px; vertical-align: top; -moz-user-select: none; } .editor .writely-footnote-marker { cursor: move; } .writely-footnote-marker-highlight { background-position: -15px 0; -moz-user-select: text; } .writely-footnote-hide-selection ::-moz-selection, .writely-footnote-hide-selection::-moz-selection { background: transparent; } .writely-footnote-hide-selection ::selection, .writely-footnote-hide-selection::selection { background: transparent; } .writely-footnote-hide-selection { cursor: move; } .editor .writely-comment-yellow { background-color: #FF9; background-position: -240px 0; } .editor .writely-comment-yellow-hover { background-color: #FF0; background-position: -224px 0; } .editor .writely-comment-blue { background-color: #C0D3FF; background-position: -16px 0; } .editor .writely-comment-blue-hover { background-color: #6292FE; background-position: 0 0; } .editor .writely-comment-orange { background-color: #FFDEAD; background-position: -80px 0; } .editor .writely-comment-orange-hover { background-color: #F90; background-position: -64px 0; } .editor .writely-comment-green { background-color: #99FBB3; background-position: -48px 0; } .editor .writely-comment-green-hover { background-color: #00F442; background-position: -32px 0; } .editor .writely-comment-cyan { background-color: #CFF; background-position: -208px 0; } .editor .writely-comment-cyan-hover { background-color: #0FF; background-position: -192px 0; } .editor .writely-comment-purple { background-color: #EBCCFF; background-position: -144px 0; } .editor .writely-comment-purple-hover { background-color: #90F; background-position: -128px 0; } .editor .writely-comment-magenta { background-color: #FCF; background-position: -112px 0; } .editor .writely-comment-magenta-hover { background-color: #F0F; background-position: -96px 0; } .editor .writely-comment-red { background-color: #FFCACA; background-position: -176px 0; } .editor .writely-comment-red-hover { background-color: #FF7A7A; background-position: -160px 0; } .editor .writely-comment-marker { background-image: url('MISSING'); background-color: transparent; padding-right: 11px; background-repeat: no-repeat; width: 16px; height: 16px; -moz-user-select: none; } .editor .writely-comment-hidden { padding: 0; background: none; } .editor .writely-comment-marker-hidden { background: none; padding: 0; width: 0; } .editor .writely-comment-none { opacity: .2; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=20); -moz-opacity: .2; } .editor .writely-comment-none-hover { opacity: .2; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=20); -moz-opacity: .2; } .br_fix br:not(:-moz-last-node):not(:-moz-first-node) { position:relative; left: -1ex } .br_fix br+br { position: static !important } } h6 { font-size: 8pt } h5 { font-size: 8pt } h4 { font-size: 10pt } h3 { font-size: 12pt } h2 { font-size: 14pt } h1 { font-size: 18pt } blockquote {padding: 10px; border: 1px #DDD dashed } a img {border: 0} .pb { border-width: 0; page-break-after: always; /* We don't want this to be resizeable, so enforce a width and height using !important */ height: 1px !important; width: 100% !important; } .editor .pb { border-top: 1px dashed #C0C0C0; border-bottom: 1px dashed #C0C0C0; } div.google_header, div.google_footer { position: relative; margin-top: 1em; margin-bottom: 1em; } /* Table of contents */ .editor div.writely-toc { background-color: #f3f3f3; border: 1px solid #ccc; } .writely-toc > ol { padding-left: 3em; font-weight: bold; } ol.writely-toc-subheading { padding-left: 1em; font-weight: normal; } /* IE6 only */ * html writely-toc ol { list-style-position: inside; } .writely-toc-none { list-style-type: none; } .writely-toc-decimal { list-style-type: decimal; } .writely-toc-upper-alpha { list-style-type: upper-alpha; } .writely-toc-lower-alpha { list-style-type: lower-alpha; } .writely-toc-upper-roman { list-style-type: upper-roman; } .writely-toc-lower-roman { list-style-type: lower-roman; } .writely-toc-disc { list-style-type: disc; } /* Ordered lists converted to numbered lists can preserve ordered types, and vice versa. This is confusing, so disallow it */ ul[type="i"], ul[type="I"], ul[type="1"], ul[type="a"], ul[type="A"] { list-style-type: disc; } ol[type="disc"], ol[type="circle"], ol[type="square"] { list-style-type: decimal; } /* end default css */ /* default print css */ @media print { body { padding: 0; margin: 0; } div.google_header, div.google_footer { display: block; min-height: 0; border: none; } div.google_header { flow: static(header); } /* used to insert page numbers */ div.google_header::before, div.google_footer::before { position: absolute; top: 0; } div.google_footer { flow: static(footer); } /* always consider this element at the start of the doc */ div#google_footer { flow: static(footer, start); } span.google_pagenumber { content: counter(page); } span.google_pagecount { content: counter(pages); } callout.google_footnote { display: prince-footnote; footnote-style-position: inside; /* These styles keep the footnote from taking on the style of the text surrounding the footnote marker. They can be overridden in the document CSS. */ color: #000; font-family: Verdana; font-size: 10.0pt; font-weight: normal; } /* Table of contents */ #WritelyTableOfContents a::after { content: leader('.') target-counter(attr(href), page); } #WritelyTableOfContents a { text-decoration: none; color: black; } } @page { @top { content: flow(header); } @bottom { content: flow(footer); } @footnotes { border-top: solid black thin; padding-top: 8pt; } } /* end default print css */ /* custom css */ /* end custom css */ /* ui edited css */ body { font-family: Verdana; font-size: 10.0pt; line-height: normal; background-color: #ffffff; } /* end ui edited css */ /* editor CSS */ .editor a:visited {color: #551A8B} .editor table.zeroBorder {border: 1px dotted gray} .editor table.zeroBorder td {border: 1px dotted gray} .editor table.zeroBorder th {border: 1px dotted gray} .editor div.google_header, .editor div.google_footer { border: 2px #DDDDDD dashed; position: static; width: 100%; min-height: 2em; } .editor .misspell {background-color: yellow} .editor .writely-comment { font-size: 9pt; line-height: 1.4; padding: 1px; border: 1px dashed #C0C0C0 } /* end editor CSS */
[root@fxvsystem root]# gpg --gen-key >>这个命令生成密钥
gpg (GnuPG) 1.2.4; Copyright (C) 2003 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.
Please select what kind of key you want: >>选择密钥类型
(1) DSA and ElGamal (default)
(2) DSA (sign only)
(4) RSA (sign only)
Your selection? 1
DSA keypair will have 1024 bits.
About to generate a new ELG-E keypair. >>选择密钥长度
minimum keysize is 768 bits
default keysize is 1024 bits
highest suggested keysize is 2048 bits
What keysize do you want? (1024) 768
Requested keysize is 768 bits
Please specify how long the key should be valid. >>选择密钥有效期,0代表没有期限
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0) 0
Key does not expire at all
Is this correct (y/n)? y >>最后确认是否正确
You need a User-ID to identify your key; the software constructs the user id
from Real Name, Comment and Email Address in this form:
"Heinrich Heine (Der Dichter) < [email protected]>"Real name: test201 >>输入基本信息,真实名字
Email address: [email protected] >>输入邮件地址
Comment: this is 201 key >>其他相关注释信息
You selected this USER-ID:
"test201 (this is 201 key) < [email protected]>"Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O >>确认OK
You need a Passphrase to protect your secret key.Enter passphrase: >>输入密钥口令
Repeat passphrase:We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
+++++.+++++++++++++++++++++++++++++++++++++++++++++.+++++..+++++++++++++++++++++++++++++++++++++++++++++.+++++..++++++++++.+++++++++++++++>.++++++++++...........................................................+++++
>>生成密钥过程会出现连续的这种符号。
Not enough random bytes available. Please do some other work to give
the OS a chance to collect more entropy! (Need 215 more bytes)
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy. >>这段话表明提示我们在系统上创建一些随机的活动,如果没有足够的活动,他会停下来提示我们继续这样做。(比如查看一下cpu,随意敲打一 下键盘都可以)
++++++++++.+++++++++++++++.++++++++++++++++++++.++++++++++.+++++++++++++++++++++++++.+++++.+++++.+++++++++++++++.+++++.++++++++++++++++++++....>+++++..+++++^^^^^
gpg: /root/.gnupg/trustdb.gpg: trustdb created
public and secret key created and signed.
key marked as ultimately trusted.pub 1024D/BA56DDDA 2007-01-16 test201 (this is 201 key) < [email protected]> 这行里面的BA56DDDA是生成的公共密钥的标识,我们在后面还要使用,记住它吧。
Key fingerprint = 98E8 0A56 9E16 F61B 379D 2F53 D5DF 4117 BA56 DDDA
sub 768g/8F754496 2007-01-16
>>成功
[root@fxvsystem root]#
[root@fxvsystem root]# cd .gnupg/
[root@fxvsystem .gnupg]# ll
total 24
-rw------- 1 root root 8075 Jan 16 11:10 gpg.conf
-rw------- 1 root root 856 Jan 16 11:30 pubring.gpg 存放别人公共密钥的“钥匙环”文件。
-rw------- 1 root root 0 Jan 16 11:10 pubring.gpg~
-rw------- 1 root root 600 Jan 16 11:30 random_seed
-rw------- 1 root root 991 Jan 16 11:30 secring.gpg
-rw------- 1 root root 1240 Jan 16 11:30 trustdb.gpg
[root@fxvsystem .gnupg]#
[root@fxvsystem gpg]# gpg --armor --export BA56DDDA > 201.key 把公共密钥提取到文件201.key中。其中:
[root@localhost gpg]# gpg --import 201.key
gpg: key BA56DDDA: public key "test201 (this is 201 key) < [email protected]>" imported
gpg: Total number processed: 1
gpg: imported: 1
[root@localhost gpg]# gpg -kv
/root/.gnupg/pubring.gpg
------------------------
pub 1024D/1C05EC6B 2007-01-15
uid Paolo (this test destination 213) < [email protected]>
sub 1024g/A16A8685 2007-01-15
pub 1024D/BC3AA97D 2007-01-15
uid Wangqi (test to 161) < [email protected]>
sub 1024g/33A9764D 2007-01-15pub 1024D/BA56DDDA 2007-01-16
uid test201 (this is 201 key) < [email protected]>
sub 768g/8F754496 2007-01-16[root@localhost gpg]#
[root@localhost ~]# gpg -ea -r BA56DDDA install.log >>通过这个命令对install.log文件进行加密。
gpg: 8F754496: There is no assurance this key belongs to the named user
pub 768g/8F754496 2007-01-16 test201 (this is 201 key) < [email protected]>
Primary key fingerprint: 98E8 0A56 9E16 F61B 379D 2F53 D5DF 4117 BA56 DDDA
Subkey fingerprint: DC76 48E6 70C0 CD36 F671 D2D3 AEC5 02A2 8F75 4496It is NOT certain that the key belongs to the person named
in the user ID. If you *really* know what you are doing,
you may answer the next question with yes.Use this key anyway? (y/N) y
[root@localhost ~]# ls
[root@fxvsystem gpg]# ls
201.key install.log.asc
[root@fxvsystem gpg]# gpg -o install.log -d install.log.asc >>这个命令进行解密,-o为输出到一个文件中,-d表示解密。
You need a passphrase to unlock the secret key for
user: "test201 (this is 201 key) < [email protected]>"
768-bit ELG-E key, ID 8F754496, created 2007-01-16 (main key ID BA56DDDA)
gpg: encrypted with 768-bit ELG-E key, ID 8F754496, created 2007-01-16我们可以看到在当前目录下生成了一个install.log文件,这个文件就是解密后的文件,可以直接查看。
"test201 (this is 201 key) < [email protected]>"
[root@fxvsystem gpg]# ls
201.key install.log install.log.asc
[root@fxvsystem gpg]#
[root@fxvsystem root]# openssl enc -des -e -a -in install.log -out install.log.des输入密码之后,就会生成install.log.des文件,这个文件名是自己指定的,可以随意写。
enter des-cbc encryption password:
Verifying - enter des-cbc encryption password:
[root@fxvsystem gpg]# openssl enc -des -d -a -in install.log.des -out install.log
enter des-cbc decryption password: