Copy to ClipboardCopied!Toggle word wrapToggle overflow
这应该返回类似如下的输出:
tkstool: Version 1.0
tkstool: Version 1.0
Copy to ClipboardCopied!Toggle word wrapToggle overflow
创建新软件数据库。
tkstool -N -d .
Enter a password which will be used to encrypt your keys.
The password should be at least 8 characters long,
and should contain at least one non-alphabetic character.
Enter new password:
Re-enter password:
tkstool -N -d .
Enter a password which will be used to encrypt your keys.
The password should be at least 8 characters long,
and should contain at least one non-alphabetic character.
Enter new password:
Re-enter password:
Copy to ClipboardCopied!Toggle word wrapToggle overflow
tkstool -L -d .
slot: NSS User Private Key and Certificate Services
token: NSS Certificate DB
Enter Password or Pin for "NSS Certificate DB":
tkstool: the specified token is empty
tkstool -L -d .
slot: NSS User Private Key and Certificate Services
token: NSS Certificate DB
Enter Password or Pin for "NSS Certificate DB":
tkstool: the specified token is empty
Copy to ClipboardCopied!Toggle word wrapToggle overflow
创建名为 传输的传输密钥。
tkstool -T -d . -n transport
tkstool -T -d . -n transport
Copy to ClipboardCopied!Toggle word wrapToggle overflow
Copy to ClipboardCopied!Toggle word wrapToggle overflow
此时会出现类似如下的响应:
Generating first symmetric key . . .
Generating second symmetric key . . .
Generating third symmetric key . . .
Extracting transport key from operational token . . .
transport key KCV: A428 53BA
Storing transport key on final specified token . . .
Naming transport key "transport" . . .
Successfully generated, stored, and named the transport key!
Generating first symmetric key . . .
Generating second symmetric key . . .
Generating third symmetric key . . .
Extracting transport key from operational token . . .
transport key KCV: A428 53BA
Storing transport key on final specified token . . .
Naming transport key "transport" . . .
Successfully generated, stored, and named the transport key!
Copy to ClipboardCopied!Toggle word wrapToggle overflow
再次列出密钥数据库的内容。
tkstool -L -d .
slot: NSS User Private Key and Certificate Services
token: NSS Certificate DB
Enter Password or Pin for "NSS Certificate DB":
0 transport
tkstool -L -d .
slot: NSS User Private Key and Certificate Services
token: NSS Certificate DB
Enter Password or Pin for "NSS Certificate DB":
0 transport
Copy to ClipboardCopied!Toggle word wrapToggle overflow
使用传输密钥生成和嵌套主密钥,并将主密钥存储在名为 file 的文件中。
tkstool -W -d . -n wrapped_master -t transport -o file
Enter Password or Pin for "NSS Certificate DB":
Retrieving the transport key (for wrapping) from the specified token . . .
Generating and storing the master key on the specified token . . .
Naming the master key "wrapped_master" . . .
Successfully generated, stored, and named the master key!
Using the transport key to wrap and store the master key . . .
Writing the wrapped data (and resident master key KCV) into the file
called "file" . . .
wrapped data: 47C0 06DB 7D3F D9ED
FE91 7E6F A7E5 91B9
master key KCV: CED9 4A7B
(computed KCV of the master key residing inside the wrapped data)
tkstool -W -d . -n wrapped_master -t transport -o file
Enter Password or Pin for "NSS Certificate DB":
Retrieving the transport key (for wrapping) from the specified token . . .
Generating and storing the master key on the specified token . . .
Naming the master key "wrapped_master" . . .
Successfully generated, stored, and named the master key!
Using the transport key to wrap and store the master key . . .
Writing the wrapped data (and resident master key KCV) into the file
called "file" . . .
wrapped data: 47C0 06DB 7D3F D9ED
FE91 7E6F A7E5 91B9
master key KCV: CED9 4A7B
(computed KCV of the master key residing inside the wrapped data)
Copy to ClipboardCopied!Toggle word wrapToggle overflow
再次列出软件密钥数据库的内容。
tkstool -L -d .
slot: NSS User Private Key and Certificate Services
token: NSS Certificate DB
Enter Password or Pin for "NSS Certificate DB":
0 wrapped_master
1 transport
tkstool -L -d .
slot: NSS User Private Key and Certificate Services
token: NSS Certificate DB
Enter Password or Pin for "NSS Certificate DB":
0 wrapped_master
1 transport
Copy to ClipboardCopied!Toggle word wrapToggle overflow
tkstool -U -d . -n unwrapped_master -t transport -i file
Enter Password or Pin for "NSS Certificate DB":
Retrieving the transport key from the specified token (for unwrapping) . . .
Reading in the wrapped data (and resident master key KCV) from the file
called "file" . . .
wrapped data: 47C0 06DB 7D3F D9ED
FE91 7E6F A7E5 91B9
master key KCV: CED9 4A7B
(pre-computed KCV of the master key residing inside the wrapped data)
Using the transport key to temporarily unwrap the master key to
recompute its KCV value to check against its pre-computed KCV value . . .
master key KCV: CED9 4A7B
(computed KCV of the master key residing inside the wrapped data)
master key KCV: CED9 4A7B
(pre-computed KCV of the master key residing inside the wrapped data)
Using the transport key to unwrap and store the master key on the
specified token . . .
Naming the master key "unwrapped_master" . . .
Successfully unwrapped, stored, and named the master key!
tkstool -U -d . -n unwrapped_master -t transport -i file
Enter Password or Pin for "NSS Certificate DB":
Retrieving the transport key from the specified token (for unwrapping) . . .
Reading in the wrapped data (and resident master key KCV) from the file
called "file" . . .
wrapped data: 47C0 06DB 7D3F D9ED
FE91 7E6F A7E5 91B9
master key KCV: CED9 4A7B
(pre-computed KCV of the master key residing inside the wrapped data)
Using the transport key to temporarily unwrap the master key to
recompute its KCV value to check against its pre-computed KCV value . . .
master key KCV: CED9 4A7B
(computed KCV of the master key residing inside the wrapped data)
master key KCV: CED9 4A7B
(pre-computed KCV of the master key residing inside the wrapped data)
Using the transport key to unwrap and store the master key on the
specified token . . .
Naming the master key "unwrapped_master" . . .
Successfully unwrapped, stored, and named the master key!
Copy to ClipboardCopied!Toggle word wrapToggle overflow
列出密钥数据库的内容,以显示所有密钥。
tkstool -L -d .
slot: NSS User Private Key and Certificate Services
token: NSS Certificate DB
Enter Password or Pin for "NSS Certificate DB":
0 unwrapped_master
1 wrapped_master
2 transport
tkstool -L -d .
slot: NSS User Private Key and Certificate Services
token: NSS Certificate DB
Enter Password or Pin for "NSS Certificate DB":
0 unwrapped_master
1 wrapped_master
2 transport
Copy to ClipboardCopied!Toggle word wrapToggle overflow
从数据库中删除密钥。
tkstool -D -d . -n wrapped_master
Enter Password or Pin for "NSS Certificate DB":
tkstool: 1 key(s) called "wrapped_master" were deleted
tkstool -D -d . -n wrapped_master
Enter Password or Pin for "NSS Certificate DB":
tkstool: 1 key(s) called "wrapped_master" were deleted
Copy to ClipboardCopied!Toggle word wrapToggle overflow
再次列出密钥数据库的内容,以显示所有密钥。
tkstool -L -d .
slot: NSS User Private Key and Certificate Services
token: NSS Certificate DB
Enter Password or Pin for "NSS Certificate DB":
0 unwrapped_master
1 transport
tkstool -L -d .
slot: NSS User Private Key and Certificate Services
token: NSS Certificate DB
Enter Password or Pin for "NSS Certificate DB":
0 unwrapped_master
1 transport
Copy to ClipboardCopied!Toggle word wrapToggle overflow