Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; using sect233k1
- ; define curve T = (m,f(x),a,b,G,n,h), where
- ; m = 233 and finite field F(2^233) is defined by:
- ; f(x) = x^233 + x^74 + 1
- ; = curve E: y^2 + xy = ax^2 + b defined by:
- ; a = 0000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
- ; b = 0000 00000000 00000000 00000000 00000000 00000000 00000000 00000001
- ; G(comp) = 020172 32BA853A 7E731AF1 29F22FF4 149563A4 19C26BF5 0A4C9D6E EFAD6126
- ; G(ucomp) = 04 017232BA 853A7E73 1AF129F2 2FF41495 63A419C2 6BF50A4C 9D6EEFAD 6126'01DB 537DECE8 19B7F70F 555A67C4 27A8CD9B F18AEB9B 56E0C110 56FAE6A3
- ; n = 80 00000000 00000000 00000000 00069D5B B915BCD4 6EFB1AD5 F173ABDF
- ; h = 01
- ; ## KEYGEN ## generate key pair (d, Q)
- ; d is secret. Assert d in range [1, n-1] (random).
- ; Q = d*G
- ; output (d, Q)
- ; ## PUBKEY VALID ##
- ; assert Q != infinity point
- ; assert xQ, yQ are of degree <= m-1
- ; assert nQ = infinity point
- ; if h = 1, skip final assertion
- ; ## SECRET COMPUTE ##
- ; inputs:
- ; private key d(alice) associated with T(alice)
- ; public key Q(bob) associated with T(bob)
- ; P = (x, y) = h * d(alice) * Q(bob)
- ; if P = infinite point, invalid
- ; output x as shared secret field
- ; (optional, but recommended) pass x to a KDF to generate symmetric key
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement