Adobe 12020596 User Guide - Page 21

Public-Key Security Handlers

Page 21 highlights

Adobe Acrobat SDK Adobe® Supplement to the ISO 32000 Syntax (Chapter 3 in PDF Reference) 3.5.3 Public-Key Security Handlers 21 1. Extend the permissions (contents of the P integer) to 64 bits by setting the upper 32 bits to all 1's. (This allows for future extension without changing the format.) 2. Record the 8 bytes of permission in the bytes 0-7 of the block, low order byte first. 3. Set byte 8 to the ASCII value 'T' or 'F' according to the EncryptMetadata Boolean. 4. Set bytes 9-11 to the ASCII characters 'a', 'd', 'b'. 5. Set bytes 12-15 to 4 bytes of random data, which will be ignored. 6. Encrypt the 16-byte block using AES-256 in ECB mode with an initialization vector of zero, using the file encryption key as the key. The result (16 bytes) is stored as the Perms string, and checked for validity when the file is opened. Algorithm 3.11 Authenticating the User Password 1. Test the password against the user key by computing the SHA-256 hash of the UTF-8 password concatenated with the 8 bytes of User Validation Salt. If the 32-byte result matches the first 32 bytes of the U string, this is the user password. Algorithm 3.12 Authenticating the Owner Password 1. Test the password against the user key by computing the SHA-256 hash of the UTF-8 password concatenated with the 8 bytes of Owner Validation Salt and the 48 byte U string. If the 32 byte result matches the first 32 bytes of the O string, this is the user password. Algorithm 3.13 Validating the Permissions 1. Decrypt the 16 byte Perms string using AES-256 in ECB mode with an initialization vector of zero and the file encryption key as the key. Verify that bytes 9-11 of the result are the characters 'a', 'd', 'b'. Bytes 0-3 of the decrypted Perms entry, treated as a little-endian integer, are the user permissions. They should match the value in the P key. Byte 8 should match the boolean value of the EncryptMetadata key. 3.5.3 Public-Key Security Handlers Public-Key Encryption Algorithms On page 131, modify the paragraph shown below by inserting the indicated phrase. The encryption key that is used by Algorithm 3.1 is calculated by means of an a SHA-1 message digest operation for a key length of 128 bits or a SHA-256 digest operation for a key length of 256 bits that digests the following data, in order:

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140

Adobe Acrobat SDK
Syntax (Chapter 3 in PDF Reference)
Adobe® Supplement to the ISO 32000
3.5.3 Public-Key Security Handlers
21
1.
Extend the permissions (contents of the
P
integer) to 64 bits by setting the upper 32 bits to all 1’s. (This
allows for future extension without changing the format.)
2.
Record the 8 bytes of permission in the bytes 0-7 of the block, low order byte first.
3.
Set byte 8 to the ASCII value '
T
' or '
F
' according to the
EncryptMetadata
Boolean.
4.
Set bytes 9-11 to the ASCII characters '
a
', '
d
', '
b
'.
5.
Set bytes 12-15 to 4 bytes of random data, which will be ignored.
6.
Encrypt the 16-byte block using AES-256 in ECB mode with an initialization vector of zero, using the file
encryption key as the key. The result (16 bytes) is stored as the
Perms
string, and checked for validity
when the file is opened.
Algorithm 3.11
Authenticating the User Password
1.
Test the password against the user key by computing the SHA-256 hash of the UTF-8 password
concatenated with the 8 bytes of User Validation Salt. If the 32-byte result matches the first 32 bytes of
the
U
string, this is the user password.
Algorithm 3.12
Authenticating the Owner Password
1.
Test the password against the user key by computing the SHA-256 hash of the UTF-8 password
concatenated with the 8 bytes of Owner Validation Salt and the 48 byte
U
string. If the 32 byte result
matches the first 32 bytes of the
O
string, this is the user password.
Algorithm 3.13
Validating the Permissions
1.
Decrypt the 16 byte
Perms
string using AES-256 in ECB mode with an initialization vector of zero and
the file encryption key as the key. Verify that bytes 9-11 of the result are the characters ‘
a
’, ‘
d
’, ‘
b
’. Bytes
0-3 of the decrypted
Perms
entry, treated as a little-endian integer, are the user permissions. They
should match the value in the
P
key. Byte 8 should match the boolean value of the
EncryptMetadata
key.
3.5.3 Public-Key Security Handlers
Public-Key Encryption Algorithms
On page 131, modify the paragraph shown below by inserting the indicated phrase.
The encryption key that is used by Algorithm 3.1 is calculated by means of an a SHA-1 message digest
operation
for a key length of 128 bits or a SHA-256 digest operation for a key length of 256 bits
that digests
the following data, in order: