I'm afraid I haven't understood how the TrueCrypt stores the file size:
------------------------------------------------------------------
struct TrueCrypt_Header {

  /* Salt is visible (appears as random bytes) */ //I store the IV like this
  char salt[64];

  /* Format (after decryption), 512 - 64(salt) = 448 bytes */
  /** Format is encrypted, isn't it? **/
  char magic[4];          /* "TRUE" in ASCII */ //What is it used for?!
  uint16_t version;       /* Header format version */ //For now, I don't have 
different versions
  uint16_t version_tc;    /* Minimal required program version */ //See previous 
one
  uint32_t keys_crc32;    /* CRC32 of keys area */ //Hash of keys?
  uint64_t _reserved1[2]; /* unused (former modification time) */
  uint64_t hidden_volume_size; /* size of hidden volume or zero*/ //That's the 
file size, isn't it?
  uint64_t volume_size;   /* size of volume or zero */ //Another file size?
  uint64_t mk_offset;     /* encrypted payload offset in bytes */ //Haven't 
understood...
  uint64_t mk_size;       /* encrypted area size; ignored by cryptsetup */
  uint32_t flags;         /* system/in-place; ignored by cryptsetup */
  uint32_t sector_size;   /* sector size in bytes, always 512 */ //What's the 
sense in writing
  //constant value?
  uint8_t  _reserved2[120]; /* unused */
  uint32_t header_crc32;  /* CRC32 of header without keys; for version > 3 */ 
//Hash of full header?

  /* Key storage area */
  char keys[256]; //And the keys are here as well?!
}
-----------------------------------------------------------------

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to