27
Sep
08

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!


7 Responses to “Converting ASCII to BIGINT and vice versa”


  1. September 28, 2008 at 7:35 am

    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?

  2. 2 chikaradirghsa
    September 28, 2008 at 6:53 pm

    @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 0×3039 and then (as you said) put in the LSB of the bigint.

    Do you think unicode representation will be much easier?

  3. 3 tetangga sebelah
    October 6, 2008 at 7:36 pm

    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

  4. 4 chikaradirghsa
    October 6, 2008 at 8:50 pm

    @tetangga sebelah: jelasin atuh process widening!

  5. 6 alarroste
    February 19, 2009 at 4:40 am

    Hello webmaster,
    I would like to share with you a link, write to alarroste@mail.ru


Leave a Reply




Blog Stats

  • 11,041 hits

Categories

 

September 2008
M T W T F S S
« Aug   Oct »
1234567
891011121314
15161718192021
22232425262728
2930