DEV Community

Discussion on: You Wouldn't Base64 a Password! Cryptography Terms and Concepts for Developers

Collapse
 
qm3ster profile image
Mihail Malo

Given a public key, it is almost impossible to figure out what the private key is.
Given a private key, you can near-instantly calculate the related public key.

Is this really so?
I thought the two were essentially two sides of the same coin, and we just arbitrarily choose one to be the private key and hide it and publish the remaining one.

Collapse
 
paragoniescott profile image
Scott Arciszewski

I thought the two were essentially two sides of the same coin, and we just arbitrarily choose one to be the private key and hide it and publish the remaining one

Nope! See also: 3v4l.org/ZJNVT

Collapse
 
qm3ster profile image
Mihail Malo

We have to go more public!

array(5) {
  ["secret key"]=>
  string(64) "2337c49553ee014b5deeb0506015dde1256236468aa83e2a0014eaa3178aba82"
  ["public key"]=>
  string(64) "a393199a4e8333d558d0832909d7bb3966280f0e0139f718fb903f2bd032362d"
  ["public key from secret key"]=>
  string(64) "a393199a4e8333d558d0832909d7bb3966280f0e0139f718fb903f2bd032362d"
  ["super public key from public key"]=>
  string(64) "63079d6d457e7ef05e31a65c7b08a3fff2971b9e2943954565725b69f0754627"
  ["super super public key from super public key"]=>
  string(64) "ec3f52bde73b8026c0bb00ccc0a936529e617b9b3233ec0e02d95d3f5c1fe344"
}