×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    4

    Asking about IV & key format in AES 128 CBC

    I had used Cryptography Symbian library.
    And I had tried to decrypt .dcf file (protected media content) using AES 128 CBC, but I get stuck with key & IV (initial vector) format or encoding in that API.

    first, I try with hex format (32 character), but my program get kernel panic (exit).
    And then I try with ASCII format (16 character) and decryption is success. But the decypted file can not be played in native music player in nokia device.


    Any body can give me clue to solve this problem.


    thanks before,,

  2. #2
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Asking about IV & key format in AES 128 CBC

    I think you need to reset a bit, and think on this some more. The decryption interface isn't going to decode a "hex" string (characters 0-F) -- you have to do that for it if you have hex. And you have to be aware that "characters" can be either 8 or 16 bits (1 or 2 bytes). Generally you don't want to be passing 16-bit characters to the interface.

    The Symbian C++ data types do a lot of 8/16 conversion for you automatically, which unfortuntely in this case you have to very carefully study their descriptions to be sure you're getting the behavior you want. The Symbian C++ data types also have variants that don't actually have a buffer "behind" them, but point to a buffer elsewhere -- you need to be aware of where your buffers are actually allocated.

    If you were getting a panic it most likely means that a buffer (for key, IV, or in/out data) passed to the interface was bad -- not allocated or too short.

  3. #3
    Registered User
    Join Date
    Nov 2010
    Posts
    4

    Re: Asking about IV & key format in AES 128 CBC

    So, does the API need to be passed with key & IV in 16 Byte character?

    But, I am still confuse with the encoding of the character that must be passed.
    Could you tell me please, because I can not find any clue in API header.

  4. #4
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Asking about IV & key format in AES 128 CBC

    Everything should be "byte" -- no "encoding". If you start with the data in a QString or other 16-bit character form you're probably broken before you start, since the data got converted from 8-bit form in a relatively unpredictable fashion.

Similar Threads

  1. Replies: 3
    Last Post: 2011-01-19, 10:50
  2. Cryptology API - AES 128 CBC
    By gugionut in forum Symbian
    Replies: 1
    Last Post: 2010-05-14, 10:42
  3. using AES CBC in crypto api
    By Christophe.A in forum Symbian
    Replies: 2
    Last Post: 2008-06-23, 12:35
  4. About IV in AES of DRM ToolKit
    By linux_ai in forum Digital Rights Management & Content Downloading
    Replies: 1
    Last Post: 2006-11-17, 13:35
  5. About the key of AES
    By linux_ai in forum Digital Rights Management & Content Downloading
    Replies: 2
    Last Post: 2006-11-17, 13:32

Posting Permissions

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