python - Regenerating Public and Private Key based on modulus and public exponent -


i've got started towards learning how rsa works , overall in cryptography , i've got question. lets have rsa modulus , public exponent of public key:

n = aa18aba43b50deef38598faf87d2ab634e4571c130a9bca7b878267414faab8b471bd8965f5c9fc3818485eaf529c26246f3055064a8de19c8c338be5496cbaeb059dc0b358143b44a35449eb264113121a455bd7fde3fac919e94b56fb9bb4f651cdb23ead439d6cd523eb08191e75b35fd13a7419b3090f24787bd4f4e1967 e = 65537 

and trying follow guide generate public , private key: https://warrenguy.me/blog/regenerating-rsa-private-key-python

my question is, how can literally both private key , public key? if convert n integer form, get:

119445732379544598056145200053932732877863846799652384989588303737527328743970559883211146487286317168142202446955508902936035124709397221178664495721428029984726868375359168203283442617134197706515425366188396513684446494070223079865755643116690165578452542158755074958452695530623055205290232290667934914919 

and doesn't match integer-digit size specified in guide.

edit:

or, there way generate signature file? given n , e? of primary objective, though concluded might need private , public keys along line leading me asking main question.

thank much,

yato

in rsa public key (n, e), have. deriving private key modulus exact thing rsa wants difficult. known factoring problem. if tractable problem computationally rsa not useful cryptosystem. in fact, computers have gotten faster , algorithms factoring have improved (see: gnfs) recommended bit length of rsa key has gotten longer combat this. 1024 once considered acceptable today 2048 minimum recommendation.

you can't sign without private key, idea signature demonstrates possession of private key , use public key (which distribute in fashion parties need validate signature) confirm signature genuine. combined x.509 provide identity binding, isn't required.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -