alexzorin / authy

Go library and program to access your Authy TOTP secrets.
MIT License
800 stars 58 forks source link

Decryption failed #30

Closed Reduxx closed 4 weeks ago

Reduxx commented 1 month ago

On 2024-06-11 I could successfully run the program and decrypt all my tokens with the backup password. After that i removed the new device from the account.

However I tried this again today (registering as a new device) and after entering the same backup password as last time it failed.

2024/06/18 15:38:13 Failed to decrypt token XXX:xxx: decryption failed

I have tried to disable the backup password and enable it again, but to no avail.

ceramicwhite commented 1 month ago

Authy now dynamically increases the amount of rounds of password-based key derivation function for encrypting seeds.

Mine is set 100000 currently.

Run AUTHY_DEBUG=1 authy-export

Check what "key_derivation_iterations": is set at

Then modify crypto.go kdfRounds to match yours and rebuild

for example I set: kdfRounds = 100000

Reduxx commented 1 month ago

Thank you! That worked perfectly. Maybe this could be mentioned somewhere in the Readme or automatically be set when the api response comes back.

pdtan commented 4 weeks ago

tried to modify kdfRounds to match key_derivation_iterations but still got 'Decryption failed'

WhitespaceQ commented 4 weeks ago

The master branch still couldn't decrypt keys, can you check and reopen this issue?

edit: as of commit 6124871