Thread: Finding a Key - C

  1. #1
    Unregistered
    Guest

    Post Finding a Key - C

    Hi,
    I was wondering would anybody have any ideas on my problem.

    I am trying to find a key which encrypts a plaintext byte. I am using a limited exhaustive search and have reduced the number of bits need to be flipped.

    here is my variable.

    #define WORD16 unsigned short

    WORD16 key[1]={0xffff};

    now...is there anyway I can cycle through all possible values for this key and test the output. The key is in hex. At the moment I am using a counter, converting it to hex and it is getting rather messy!!! Basically is there an automated way I can get all possible values up to the hex value 0xffff.

    Any suggestions would be very much appreciated....
    thank you!!!

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    > now...is there anyway I can cycle through all possible values for this key and test the output.
    A loop and an if statement seem like a good place to start.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  3. Directional Keys - Useing in Console
    By RoD in forum C++ Programming
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM
  4. FAQ: Directional Keys - Useing in Console
    By RoD in forum FAQ Board
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM