-
There seems to be something odd with the age key encryption. I have tried several implementations (Python packages bech32 and bitcoinlib) but neither seem to be able to to decode the addresses given in Age specs, nor to recreate the hash given for 32 times 0x42 (bitcoinlib actually plain refuses to convert this and some other specific sequences, although it generally accepts 32 random bytes). Is the spec somehow customized for age, and where should I look for a usable implementation of it? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Oh, I suspect those are not real examples. Try generating examples with one of the existing implementations, it should be standard Bech32. Sorry about that, a better spec is long overdue, but coming!
… On Nov 1, 2021, at 11:09, L. Kärkkäinen ***@***.***> wrote:
There seems to be something odd with the age key encryption. I have tried several implementations (Python packages bech32 and bitcoinlib) but neither seem to be able to to decode the addresses given in Age specs, nor to recreate the hash given for 32 times 0x42 (bitcoinlib actually plain refuses to convert this and some other specific sequences, although it generally accepts 32 random bytes).
Is the spec somehow customized for age, and where should I look for a usable implementation of it?
Thanks.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Beta Was this translation helpful? Give feedback.
-
Not a perfect solution but something that can be worked with, https://github.com/sipa/bech32/blob/master/ref/python/segwit_addr.py Need to use the bech32_encode/decode functions together with the convertbits function, and manually remove the 33rd byte (value 0) that it outputs. Also have to work with the secret key always in lower case or otherwise wrong checksum is created (but this is mentioned in Age spec). |
Beta Was this translation helpful? Give feedback.
Not a perfect solution but something that can be worked with, https://github.com/sipa/bech32/blob/master/ref/python/segwit_addr.py
Need to use the bech32_encode/decode functions together with the convertbits function, and manually remove the 33rd byte (value 0) that it outputs. Also have to work with the secret key always in lower case or otherwise wrong checksum is created (but this is mentioned in Age spec).