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

First 32 secret key bytes are always same #26

Open
smrt28 opened this issue Jan 22, 2019 · 6 comments
Open

First 32 secret key bytes are always same #26

smrt28 opened this issue Jan 22, 2019 · 6 comments

Comments

@smrt28
Copy link

smrt28 commented Jan 22, 2019

Does it make sense to store the first 32 bytes of the secret key since they seem to be always the same?

$ cat ~/.config/enchive/enchive.sec | xxd
00000000: 0000 0000 0000 0000 0003 0000 0000 0000  ................
00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000020: a8e6 ea13 c621 1381 1be1 f0b9 a88f 3989  .....!........9.
00000030: 2dd3 0613 0535 16fb dffa ce61 cf2d 9977  -....5.....a.-.w
@nico202
Copy link

nico202 commented Jan 22, 2019

mine is different, so I think you just leaked part of your secret key

@smrt28
Copy link
Author

smrt28 commented Jan 22, 2019

mine is different, so I think you just leaked part of your secret key

This is because you set a passphrase. If you set none, you'll get the same behavior. Seems the first 32 bytes of your secret key are just encrypted zeros with 1bit set somewhere in 9th byte. And this is definitely not my secret key in use. ;-)

@nico202
Copy link

nico202 commented Jan 22, 2019

This is because you set a passphrase. If you set none, you'll get the same behavior.

Oh, yeah right

And this is definitely not my secret key in use. ;-)

:D

@skeeto
Copy link
Owner

skeeto commented Jan 22, 2019 via email

@cyb3rz3us
Copy link

FWIW - in the above diagram provided by sketo, I believe the "file version" and "power-of-two protection" places are reversed...should be as follow:

IIIIIIIIiVPPHHHH

@skeeto
Copy link
Owner

skeeto commented Dec 30, 2019 via email

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

4 participants