| 1 |
The output file for all the algorithms (except unix crypt) when not used in |
| 2 |
bare mode is: |
| 3 |
|
| 4 |
3 bytes as: NULL + "m" + \3 |
| 5 |
One byte flag: |
| 6 |
In that version everything is null except the 7th bit which |
| 7 |
should be set if the key generator uses a salt. |
| 8 |
The 8th bit should be set if an IV is being used. |
| 9 |
The algorithm's name, null terminated (eg. blowfish) |
| 10 |
Two bytes the key length. (in little endian format) |
| 11 |
The algorithm's mode name, null terminated. (eg. cbc) |
| 12 |
The key generator's name, null terminated. (eg. mcrypt-sha1) |
| 13 |
If the 7th bit of the flag is set: |
| 14 |
One byte flag: |
| 15 |
The size of the salt, following that byte, |
| 16 |
and it's first bit is set. |
| 17 |
The salt follows. |
| 18 |
The algorithm used to compute the checksum stored at the end of file (eg. crc32), |
| 19 |
also null terminated. |
| 20 |
If the 8th bit of the flag is set: |
| 21 |
The IV (depending on the algorithm) |
| 22 |
[...encrypted data...] |
| 23 |
A checksum (eg. crc32) of the original data (encrypted). The checksum is |
| 24 |
appended to the end of the file to be encrypted. |