Tagged: converting text Toggle Comment Threads | Keyboard Shortcuts

  • CG 4:16 am on September 30, 2008 Permalink | Reply
    Tags: converting text   

    Add more points! 

    Referring to previous posting, for limited number of characters can be represented by big number, I’m thinking about dividing messages and convert them into different points in the elliptic curve.

    But next question will be: how to reconstruct the message from the points?

     
  • CG 11:33 pm on September 29, 2008 Permalink | Reply
    Tags: converting text   

    Bigger NUMBITS? 

    Is it as simple as increasing the NUMBITS to get more space for data?

     
  • CG 8:59 pm on September 29, 2008 Permalink | Reply
    Tags: , converting text   

    How big? 

    After thinking for a while, what is the maximum big integer needed to represent a stream of characters? I mean, if I convert characters into a big number like I did in the previous posting, then I can only have 42 characters at maximum! O-ow, big problem!

    Have got to find another way  [thinking hard…]

     
    • Budi Rahardjo 3:52 am on September 30, 2008 Permalink | Reply

      You can treat stream of characters as block of characters (say block of 42 characters). Then you can do the rest with your code.

      But I think there’s a better way to represent string (i.e. not just concatenate the ASCII values). Can you view them as series of bytes? This way, you can also code binary data (i.e. sequence of bytes) into big int. I am not sure whether this is efficient or not. though.

      Sorry if I am not clear. Hey, this is early in the morning and I am not awake yet. 🙂

    • chikaradirghsa 4:21 am on September 30, 2008 Permalink | Reply

      @BR: yes, exactly. it’s early in the morning and we’re still awake talking about representing characters! 😀

      agree, before reading your comment I have been thinking about dividing messages into message blocks and convert them into different points in the curve.

      i don’t understand the second paragraph. i’m treating the string as the series of bytes. explain please

    • Budi Rahardjo 9:15 am on September 30, 2008 Permalink | Reply

      In your example, CRYPTO, you convert it into a string “678289808479″. What if you convert that into sequence of bytes: 67, 82, 89, 80, 84, 74. Thus, just put them in the LSB in that order (or whatever order you choose). This way, 6 characters are turned into 6 bytes. But, you still have limitation (the number of bytes in big int). Anyway, it’s just an idea.

      The nicest thing about this is that you can read a binary file and read it into chunk of bytes. You are not limited to ASCII representation of the bytes.

      Again, I’ve seen a more efficient implementation. Basically, you want to put more bytes into the block/chunk. (Maybe base-64 or some sort? I have to read up on this. I am rusted!)

      Is it clear? Or more confusing? 😀

    • chikaradirghsa 6:55 pm on September 30, 2008 Permalink | Reply

      @BR: i have read about some string encoding/decoding like MIME base64, and I also found piece of code on that in CryptoLib, but they all just give me more headache 🙂

      i think for now i will just use the conversion in string of numbers, and do the complete cycle of encryption/decryption. then i’ll experiment with more text which will be converted to more than one points.
      then we’ll think about more efficient way to do that afterwards 😉

      how about that?

  • CG 8:28 pm on September 29, 2008 Permalink | Reply
    Tags: , , converting text,   

    Characters to numbers 

    I’m experimenting with the way of converting a string into a big integer representation. And this is how I’m doing it:

    1. Convert each character to its ASCII number, then treat them as a sequence of numbers that becomes a big number. For example, if the text is “CRYPTO” then the number will be “678289808479”. This number then will be stored in a FIELD2N variable. [done]
    2. The number then calculated to check if it fits on the curve. If not, add 1 to the next byte outside the bytes used for storing data. Repeat until the value fits in. [to be done next]

    Here’s some result:

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel