Comments (2)
It looks to me like the bug is not in age
, but in golang.org/x/crypto/ssh
. With this program you can reproduce the described error:
package main
import "golang.org/x/crypto/ssh"
// Generated with this command; password not empty!:
// ssh-keygen -t ed25519 -Z [email protected] -f key
var secretKey = `
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAAHWNoYWNoYTIwLXBvbHkxMzA1QG9wZW5zc2guY29tAAAABm
JjcnlwdAAAABgAAAAQpOLR3nv7KFNUrn9ETd8xLgAAABAAAAABAAAAMwAAAAtzc2gtZWQy
NTUxOQAAACDzMkP7oq1LPCZQ57/dfqPlhSXAQD4e+YShT8F6ePWQcQAAAJDN11o6u28HV4
1HdH3MIsiwysiD+nUNt0RGTO46nZzc/itKhUq3pgg+V1tN0tREeVkebp34nyPbmglDMsZm
YLHZJuDAJ/57J6YsZ0iZV8ZzY1u1Wf0RtsiujUAlr2K1vxdHROJIwAyosEvTgJ3o/FHap4
xPFxkRK/ZK/bI+BRvPO9dAEqo3fNPVW7RLVwLfi332ObUSUvnoihvTTaQ1oxqn
-----END OPENSSH PRIVATE KEY-----
`
func main() {
_, err := ssh.ParseRawPrivateKey([]byte(secretKey))
if err != nil {
// Should be ssh.PassphraseMissingError, but is ssh.ParseError.
panic(err)
}
}
I think you should report the problem at https://github.com/golang/go/issues.
Narrowing down the problem
I have investigated some more and found some conditions under which the problem occurs:
The problem does not occur with keys generated like this:
ssh-keygen -f key -t ed25519 -Z 3des-cbc
(with password)ssh-keygen -f key -t ed25519 -Z aes128-cbc
(with password)ssh-keygen -f key -t ed25519 -Z aes192-cbc
(with password)ssh-keygen -f key -t ed25519 -Z aes256-cbc
(with password)ssh-keygen -f key -t ed25519 -Z aes128-ctr
(with password)ssh-keygen -f key -t ed25519 -Z aes192-ctr
(with password)ssh-keygen -f key -t ed25519 -Z aes256-ctr
(with password)ssh-keygen -f key -Z aes256-ctr
(with password)ssh-keygen -f key -Z aes256-ctr
(without password)ssh-keygen -f key -Z [email protected]
(without password)ssh-keygen -f key -Z [email protected]
(without password)ssh-keygen -f key -Z [email protected]
(without password)
The problem does occur with keys generated like this:
ssh-keygen -f key -t ed25519 -Z [email protected]
(with password)ssh-keygen -f key -t ed25519 -Z [email protected]
(with password)ssh-keygen -f key -t ed25519 -Z [email protected]
(with password)ssh-keygen -f key -Z [email protected]
(with password)
It seems to me like the problem only occurs when using the ciphers [email protected]
, [email protected]
and [email protected]
and only when using a password protected key. The type of key seems to be irrelevant.
from age.
Great. I will raise the issue there. Thanks.
from age.
Related Issues (20)
- Age terminates too soon on MacOS HOT 5
- Can this method be used to encrypt movie files? HOT 1
- report unexpected HOT 1
- age: error: failed to wrap key for recipient #0: test plugin: write |1: broken pipe HOT 16
- Plugin receives only one identity or recipient when there are multiple HOT 1
- failed to decrypt and authenticate payload chunk HOT 1
- Documentation bug in /README.md #encrypting-to-a-github-user HOT 2
- Support `sk-ssh` keys HOT 2
- brew install: not a tagged release HOT 1
- Specified SSH key is not eligible for claiming. Only RSA and Ed25519 keys are supported for proof generation. HOT 9
- Couldn't decrypt with that SSH key, please choose another one. HOT 1
- Couldn't decrypt with that SSH key, please choose another one. HOT 1
- Unable to claim the reward of 5000 token FLT HOT 1
- Unsupported SSH key type: ecdsa-sha2-nistp256 HOT 2
- Decryption does not create a file when data is empty HOT 1
- ssh connection to Github HOT 1
- I am the winner of the airdrop HOT 2
- unable to decrypt a proof with ssh key HOT 1
- Choco and scoop were unable to install age in windows
- Management of `Harvest Now, Decrypt Later` strategy and Post Quantum Safe Cryptography HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from age.