/crypto-discrete-log-problem

Discrete Log Problem - Cryptography Assignment

Primary LanguagePowerShell

Discrete Log Problem - Cryptography Assignment

Discrete Logarithm Problem

Build

make clean build

Usage

python3 discrete.py

Executing

python3 discrete.py

...[snip]...
748570321223554662583880707161136401029897829149108524823330841562670134251840311727836855732412469445334719932472767369362]
[357980] ( (11717829880366207009516117596335367088558084999998952205599979459063929499736583746670572176471460312928594829675428279466566527115212748467589894601965568 ^ 1048576) ^ 357980 ) -- right hand result = [6150767643737398318394080591900748570321223554662583880707161136401029897829149108524823330841562670134251840311727836855732412469445334719932472767369362]
[357981] ( (11717829880366207009516117596335367088558084999998952205599979459063929499736583746670572176471460312928594829675428279466566527115212748467589894601965568 ^ 1048576) ^ 357981 ) -- right hand result = [6150767643737398318394080591900748570321223554662583880707161136401029897829149108524823330841562670134251840311727836855732412469445334719932472767369362]
[357982] ( (11717829880366207009516117596335367088558084999998952205599979459063929499736583746670572176471460312928594829675428279466566527115212748467589894601965568 ^ 1048576) ^ 357982 ) -- right hand result = [6150767643737398318394080591900748570321223554662583880707161136401029897829149108524823330841562670134251840311727836855732412469445334719932472767369362]
[357983] ( (11717829880366207009516117596335367088558084999998952205599979459063929499736583746670572176471460312928594829675428279466566527115212748467589894601965568 ^ 1048576) ^ 357983 ) -- right hand result = [6150767643737398318394080591900748570321223554662583880707161136401029897829149108524823330841562670134251840311727836855732412469445334719932472767369362]
[357984] ( (11717829880366207009516117596335367088558084999998952205599979459063929499736583746670572176471460312928594829675428279466566527115212748467589894601965568 ^ 1048576) ^ 357984 ) -- right hand result = [6150767643737398318394080591900748570321223554662583880707161136401029897829149108524823330841562670134251840311727836855732412469445334719932472767369362]
found our good value :P --- [x0, x1]=found_values=[357984, 787046]
checking if the values found are good... found_values=[357984, 787046]->x=375374217830
result => h = g^x
	=> [3239475104050450443565264378728065788649097520952449527834792452971981976143292558073856937958553180532878928001494706097394108577585732452307673444020333] = (11717829880366207009516117596335367088558084999998952205599979459063929499736583746670572176471460312928594829675428279466566527115212748467589894601965568 ^ 375374217830)
	=> [3239475104050450443565264378728065788649097520952449527834792452971981976143292558073856937958553180532878928001494706097394108577585732452307673444020333] = [3239475104050450443565264378728065788649097520952449527834792452971981976143292558073856937958553180532878928001494706097394108577585732452307673444020333]

Resources