Re: Help with Encryption Library

From: Hernan de Lahitte (hernan_at_lagash.com)
Date: 04/07/04

  • Next message: Javier Miranda: "RE: Windows Authentication : switching user"
    Date: Wed, 7 Apr 2004 10:42:13 -0300
    
    

    Michael,

    The minimum text lengh for decryption depends on the algorithm block size
    expressed in bytes in case you where using a block cipher algorithm like
    DES, 3DES, RC2 or Rijndael. If you take for example 3DES with a defualt
    blocksize of 64 bits (8 bytes), the minimum length will be 8 bytes. If your
    encrypted data size is less then 8 bytes, the encription process will apply
    padding to complete the 8 bytes (or a multiple of 8) size. So on every block
    ci[her your encrypted data size will always be a multiple of the blocksize
    algorithm.

    Cheers,
    Hernan

    -- 
    Hernan de Lahitte
    Lagash Systems S.A.
    http://weblogs.asp.net/hernandl
    Shadowfax Dev Team
    This posting is provided "AS IS" with no warranties, and confers no rights.
    "Mike Carr" <mcarr@san.rr.com> wrote in message
    news:uvIr6oCHEHA.2744@TK2MSFTNGP10.phx.gbl...
    I followed the Guide "How To: Create an Encryption Library" of Building
    Secure ASP.NET Applications: Authentication, Authorization, and Secure
    Communication.  I kept getting an error here:
    decStream.FlushFinalBlock() whenever the text to Decrypt was under 7
    characters.  Is there a minimum text length that TripleDes can
    Encrypt/Decrypt?
    public byte[] Decrypt(byte[] bytesData, byte[] bytesKey)
    {
    ...
      decStream.FlushFinalBlock(); <=== HERE
    ...
    } //end Decrypt
    -- 
    MICHAEL CARR
    

  • Next message: Javier Miranda: "RE: Windows Authentication : switching user"

    Relevant Pages

    • SQL 2005 Analysis Services and data encryption
      ... We've got a database which contains encrypted data. ... To encrypt and decrypt ... do we incorporate this algorithm into SSAS? ... reporting services so it's important that reporting services sees the data ...
      (microsoft.public.sqlserver.datawarehouse)
    • Re: The effect of encryption on compression ratios
      ... > Encrypted data is not compressible at all. ... > algorithm to be secure, ... Most encryption algorithms use a key ...
      (comp.compression)
    • Re: The effect of encryption on compression ratios
      ... > Encrypted data is not compressible at all. ... > algorithm to be secure, ... Compression is one such test. ...
      (comp.compression)
    • Re: Is it possible to encrypt without a key ?
      ... There is an algorithm that encrypts without a key. ... outputs both ciphertext and the key required to decrypt. ... secure and common used in some environments. ...
      (sci.crypt)
    • Re: Encrypting File System
      ... The question is now - presumably Microsoft would allow encrypted data to be ... decrypted by someone without the relevant key? ... Microsoft MVP ... The Help seems to say that, in order to decrypt ...
      (microsoft.public.windowsxp.security_admin)