Converting ASCII to BIGINT and vice versa
Reporting a little progress today, that I have successfully understood and made a code to convert ascii to bigint and vice versa.
The structure for a big integer is as follows:
typedef unsigned long ELEMENT; typedef struct { ELEMENT hw[4*MAXLONG]; } BIGINT;
MAXLONG is the number of machine words used in an array that holds NUMBITS. NUMBITS is the total number of bits we expect to be working with.
I’m still using Rosing’s book for reference.
Next step will be make more codes on big integer’s operations.
Then what? Why am I doing this anyway?
[…recalling the last progress…]
Oh – oh, I guess I was in the middle of trying to find a way on how to convert a big number into a point in elliptic curve… and then, I need to know how to represent a big big integer, and how to deal with it.
Then?
I guess it will be easier to continue working on the plaintext converting code.
Ok, that’s it for now!
Budi Rahardjo 7:35 am on September 28, 2008 Permalink |
Trying to understand. Does big integer needed in elliptic curve? Meaning, everything is done in bigint. Is that it?
How do you convert ASCII to bigint? Do you simply put the ASCII value in the LSB of the bigint? Can you extend that to unicode representation?
chikaradirghsa 6:53 pm on September 28, 2008 Permalink |
@BR: yes, big integer is needed in elliptic curve because the data and the point and the curve will be in big integer representation.
the ASCII is treated as string, then converted to big integer. Ex: “12345” will be converted into 0x3039 and then (as you said) put in the LSB of the bigint.
Do you think unicode representation will be much easier?
tetangga sebelah 7:36 pm on October 6, 2008 Permalink |
gila saking begonya saya…sampai egak tahu, kenapa ASCII ke Big-Integer jadi masalah.
bukannya ASCII atau unicode itu integer?…..jadi itu kan hanya process widening.
…..wah kayanya ini batas aku bisa nyuri ilmu……teu kataekan ahhhh
chikaradirghsa 8:50 pm on October 6, 2008 Permalink |
@tetangga sebelah: jelasin atuh process widening!
musloyals 7:49 pm on October 21, 2008 Permalink |
Hi! motrin 800