Help with Encryption Library

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Help with Encryption Library

    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
    Mike Carr Guest

  2. Similar Questions and Discussions

    1. http, library loaded, httpS library can't be found
      I'm trying to get Verisign's Payflow Pro setup and going. I thought I had everything working, but when I went in through the SSL, httpS://, it...
    2. Cannot instantiate .NET Class Library to expose webservice client library
      Now that I have got the mickey mouse .NET interop problem sorted (exposing ..NET library to ASP/VB6), I want to demo the real problem I am having. ...
    3. Calling a Managed C++ library which uses a load library function from a WS
      Good Day! Im trying to call a managed c++ library from a web service using c# but when i go trough the code the was'nt able to load the library....
    4. ~/Library/ vs ~/System/Library vs /User/Library/
      In article <110720031327074895%justin.c@se.net>, justin <justin.c@se.net> wrote: First off, you're a little bit confused. ~ means your home...
    5. [XFree86] system can't find library ( strange library behaviour )
      Hi Mark, No I hadn't tried ldconfig, but it sorted out the problem, thanks! I'd read a little bit about libraries a while ago, but could not...
  3. #2

    Default Re: Help with Encryption Library

    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.
    [url]http://weblogs.asp.net/hernandl[/url]
    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


    Hernan de Lahitte Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

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