Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"umod" returns different data on same input. #234

Open
dartedfa opened this issue Dec 19, 2019 · 1 comment
Open

"umod" returns different data on same input. #234

dartedfa opened this issue Dec 19, 2019 · 1 comment

Comments

@dartedfa
Copy link

I'm using node-sshpk Library to sign data with openssh 8.0 generated private key. I have directly imported it in react code. As I have checked it's using browserify-rsa, which has as a dependency bn.js. So I have also checked that, after passing same data to:
return new Buffer(m2.imul(blinds.unblinder).umod(priv.modulus).toArray(false, len));
.umod always returns data randomly it's always different.
Problem occurs only on openssh 8.0 generated private key. keys generated with older version of openssh works as expected.

@dartedfa
Copy link
Author

dartedfa commented Dec 19, 2019

This is a not working key example:

-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAIEAuesNFg1sAyhQBl1JkJXqzt0zRf3eOdpHLJCsPdRXM6Un82jNAtoM
W8C0TrZzD8Ovp+NRtuSFDSDQqAC3JSmFkp/QtAxJPSdVPPMMyCYtfDfuDmapLbN09/I2FF
aQsRSE1E7j/ljL3Xw+QmNrWR0eXxmS26o7keOq/x6tyHaLY2EAAAIQP41S/z+NUv8AAAAH
c3NoLXJzYQAAAIEAuesNFg1sAyhQBl1JkJXqzt0zRf3eOdpHLJCsPdRXM6Un82jNAtoMW8
C0TrZzD8Ovp+NRtuSFDSDQqAC3JSmFkp/QtAxJPSdVPPMMyCYtfDfuDmapLbN09/I2FFaQ
sRSE1E7j/ljL3Xw+QmNrWR0eXxmS26o7keOq/x6tyHaLY2EAAAADAQABAAAAgCWq58XWBl
JFcqE3eVYf6ajrzB2cJ9AU12LCFQOZ5+kAxy1byF2Ri/ty+ZURBhLllMsxFTc26XYVdfDz
5CdVWEhZ68cbocuNNwBsfCm+lCkkep0/M+/Ko/O6VvfPxPtS9XBxX9Ix2l1OW7RTJ9g5QO
/ZHghPX/nhl7bPZsJsgPqBAAAAQBRpUQbN25kLaQoKGyPFfpEYnyJvkkcuoGUCabRhphQv
EGS5itWFsMWoj2Kp7qUXnv4uAcPVUic+hPG9/waLXKIAAABBAO9wDOyJRSX6GrEHxDHhMx
GQsM3vTKHeFaKafjLzQUdYmDpzxkVWqcLiN+MrMhHNVdfWmHcvl5Mv/dIbCD+xgjkAAABB
AMbHR59J/ad2P5yps205W69VqK0tu52k84qrFa50T4ciEP4bZTKQomp8HBs4VjhyrYV816
DcN1z7Uze4d0XcymkAAAAaZXNjb0Bsb2NhbGhvc3QubG9jYWxkb21haW4B
-----END OPENSSH PRIVATE KEY-----

it doesn't need any passphrase.

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant