Thread: How do I insert a char in an unsigned long* v?

  1. #16
    Banned borko_b's Avatar
    Join Date
    Jun 2002
    Location
    Well... I live in Bulgaria :)
    Posts
    100
    >>Are you able to save today and to read tomorrow this way?
    >>being a simmetrical alg., aren't you exposing the user instead
    >>of protecting him?

    >>...To save today and read tomorow???..
    what is that meaning?
    what to save and what to read?? the key?



    >>being a simmetrical alg., aren't you exposing the user instead
    >>of protecting him?

    No . using plane chars is worse
    since the key is not changing at all

    so if you encrypt a file full of identical chars you'll get
    repetative strings inside the file like:

    "XXXXXXXXXXXXXXXXXXXXXX" < before
    "ABBCABBCABBCABBCABBCAB"> after

  2. #17
    Registered User
    Join Date
    Mar 2002
    Posts
    30
    >>...To save today and read tomorow???..
    what is that meaning?
    what to save and what to read?? the key?
    Nope, that you would bear in mind as a pass, isn't it? The crypted doc is to be read again, when needed.
    I'm affraid I didn't get your point about changing the key. (In fact I do not understand the math here, but I made it work - the original didn't).

    >>being a simmetrical alg., aren't you exposing the user instead
    >>of protecting him?

    No . using plane chars is worse
    since the key is not changing at all
    how do you input the key then?
    why do the key has to change?

    so if you encrypt a file full of identical chars you'll get
    repetative strings inside the file like:

    "XXXXXXXXXXXXXXXXXXXXXX" < before
    "ABBCABBCABBCABBCABBCAB"> after
    Can you find the key? :-) I give you the original and the result. Deal?

    damn I'll switch 2 3des...

    Robert

  3. #18
    Banned borko_b's Avatar
    Join Date
    Jun 2002
    Location
    Well... I live in Bulgaria :)
    Posts
    100
    >>how do you input the key then?
    >>why do the key has to change?

    let say we have password "asdasdasd"
    and value "aabbccddeeggbbbbb"

    so what i do is generate 8 ints from the password and call it key

    012,433,563,782,052,421,726,082
    i take the first 2 bytes from the val "aa"
    and code it with the first 4 of the key:
    012,433,563,782 TEA "aa" = "kj"
    then i take another 2 bytes of val
    and code it with the rest of the key:
    052,421,726,082 TEA "bb" = "op"


    then by a little math i transform the key to be:
    832,530,523,158,092,237,7236,1232
    than:
    832,530,523,158 TEA "cc" = "ty"
    and :
    092,237,7236,1232 TEA "dd" = "6m"

    and so on and so on...
    and the key is changing after each coding/decoding...


    >> ...Can you find the key? :-) I give ...

    Well im not a cryptographer but i thing that
    :
    "asdlkasnknv349u3noijc98ld da"
    look more cryptic than:
    "ABBCABBCABBCABBCABBCAB"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C problem with legacy code
    By andy_baptiste in forum C Programming
    Replies: 4
    Last Post: 05-19-2008, 06:14 AM
  2. How do i un-SHA1 hash something..
    By willc0de4food in forum C Programming
    Replies: 4
    Last Post: 09-14-2005, 05:59 AM
  3. Swap a bit
    By mr_nice! in forum C Programming
    Replies: 7
    Last Post: 03-01-2004, 03:15 AM
  4. Half-life SDK, where are the constants?
    By bennyandthejets in forum Game Programming
    Replies: 29
    Last Post: 08-25-2003, 11:58 AM
  5. Strings are V important...
    By NANO in forum C++ Programming
    Replies: 15
    Last Post: 04-14-2002, 11:57 AM