Welcome to the Xceed Community | Help
Community Search  
More Search Options

How do I estimate the size of encrypted/decrypted data?

Sort Posts: Previous Next
  •  09-05-2008, 1:54 PM Post no. 28479

    How do I estimate the size of encrypted/decrypted data?

    These formulas will help you estimate the size of encrypted/decrypted data :

    PTS : Plain text size (in bytes)
    CTS : Cipher text size (in bytes)
    IVS : Initialization vector size (in bytes)
    KPS : Key Pair size (in bits). The one passed to SetRandomKeyPair.

    Twofish/Rijndael
    ----------------
    Free blocks : CTS = PTS + PADDING -> CTS = PTS + 16 - ( PTS MOD 16 )
    Chained blocks : CTS = PTS + IVS + PADDING -> CTS = PTS + 16 + 16 - ( PTS MOD 16 )

    RSA-OAEP
    --------
    The following formula should work in all cases except if PTS = 0

    MaxPTSBlock = CEILING( KPS / 8 ) - 43, where 43 is the OAEP hash size + padding.

    CTS : CEILING( PTS / MaxPTSBlock ) * CEILING( KPS / 8 ) + FLOOR( PTS / MaxPTSBlock )
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.