Bitcoin Forum
May 21, 2024, 12:20:40 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Elliptic curve with strong p-1 and n-1 divisors  (Read 79 times)
vjudeu (OP)
Hero Member
*****
Offline Offline

Activity: 691
Merit: 1600



View Profile
February 18, 2024, 12:11:33 PM
Last edit: March 09, 2024, 09:42:25 AM by vjudeu
 #1

How to quickly find such curve? This is the best result I found so far:
Code:
p=0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffa5a999f
P=GF(p)
aP=P(0x0)
bP=P(0x3)
curve=EllipticCurve(P,(aP,bP))
n=curve.order()
print(hex(n))
print(factor(n-1))

p=0x100000000000000000000000000000001ecebbbe3d5814e4e8a59fa2210168a23
P=GF(p)
aP=P(0x0)
bP=P(0x3)
curve=EllipticCurve(P,(aP,bP))
n=curve.order()
print(hex(n))
print(factor(n-1))
Factors:
Code:
0x100000000000000000000000000000001ecebbbe3d5814e4e8a59fa2210168a23
2 * 3 * 19 * 1015720081029089433540096359725332525034431481054297927502942223006463572889
0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffa5a999f
2 * 3 * 19298681539552699237261830834781317975544997444273427339909597334652172485701
The question is: how to find a curve, where p-1 and n-1 divisors will be 2, 3, and some huge prime? This example is "almost there", but there is "19" in the middle. Is there a better approach than brute force?

Edit: Found it! With brute force, but still:
Code:
p=0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffcce82b9b
P=GF(p)
aP=P(0x0)
bP=P(0x3)
curve=EllipticCurve(P,(aP,bP))
n=curve.order()
print(hex(p))
print(factor(p-1))
print(hex(n))
print(factor(n-1))
In this case, n-value cannot be used to form a curve, but it should be sufficient in some cases anyway:
Code:
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffcce82b9b
2 * 3 * 19298681539552699237261830834781317975544997444273427339909597334652045406703
0xffffffffffffffffffffffffffffffff4baa10269d6cad3c794b5056fcee1c37
2 * 3 * 19298681539552699237261830834781317975505046236074564924957172105089547131401

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!