Ask Your Question
0

how to generate elliptic curve over Extension field GF(2^m) where m=113 using sagemath

asked 2017-12-10 08:29:45 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

field is F(2^m) where m=113 E:y^2+xy=x^3+ax^2+b a=003088250CA6E7C7FE649CE85820F7 b=00E8BEE4D3E2260744188BE0E9C723

edit retag flag offensive close merge delete

Comments

Is that your homework?

vdelecroix gravatar imagevdelecroix ( 2017-12-10 09:53:39 +0200 )edit

Tip: don't tick the "community wiki" checkbox when posting questions.

The "community wiki" tag is for questions that are not about Sage, but about Ask Sage itself.

Also, with the "community wiki" checkbox ticked, upvotes to your post don't earn you karma.

You need karma to be able to post links, to upvote questions and answers by others, etc.

slelievre gravatar imageslelievre ( 2017-12-10 18:25:54 +0200 )edit

To display inline code, use backticks. To display blocks of code or error messages, separate them by a blank line from the rest of the text, and indent them with 4 spaces, or select code lines and click the "code" button (the icon with '101 010').

For instance, typing

If we define `f` by

    def f(x, y):
        return (x, y)

then `f(2, 3)` returns `(2, 3)` but `f(2)` gives:

    TypeError: f() takes exactly 2 arguments (1 given)

will produce:

If we define f by

def f(x, y):
    return (x, y)

then f(2, 3) returns (2, 3) but f(2) gives:

TypeError: f() takes exactly 2 arguments (1 given)

Can you edit your question to do that?

slelievre gravatar imageslelievre ( 2017-12-10 18:26:04 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-12-11 00:11:35 +0200

dan_fulea gravatar image

As in 39628...

The modulus is also a big important part of the data, so i suppose the curve is the one displayed in:

http://www.secg.org/SEC2-Ver-1.0.pdf, page 24, label sect113r1 .

The answer is now

R.<T> = PolynomialRing( GF(2) )
F.<t> = GF( 2**113, modulus=X^113 + X^9 + 1 )

a = F.fetch_int( 0x003088250CA6E7C7FE649CE85820F7 )
b = F.fetch_int( 0x00E8BEE4D3E2260744188BE0E9C723 )

E = EllipticCurve( F, [ 1, a, 0, 0, b ] )

Comment:

We also have the order of the curve, from the reference, it is the value of the variable n below:

P = E.random_point()
n = 2*ZZ( 0x0100000000000000D9CCEC8A39E56F )
print n*P
print "Order: %s" % factor(n)

This gives (for "all random points"):

(0 : 1 : 0)
Order: 2 * 5192296858534827689835882578830703
sage: bool( (sqrt(q)-1)^2 < n )
True
sage: bool( n < (sqrt(q)+1)^2 )
True
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-12-10 08:29:45 +0200

Seen: 241 times

Last updated: Dec 11 '17