question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with pem file loading for cryptobox authentication

See original GitHub issue

While wrinting code for the FR to support cryptobox in my dart client , I tried to load a pem openssh key file:

-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtz
c2gtZWQyNTUxOQAAACBzrHeC0mZW98aJCo8m7eatQsS94B5qoTZmjmgjTF+N5wAA
AKBpeZFdaXmRXQAAAAtzc2gtZWQyNTUxOQAAACBzrHeC0mZW98aJCo8m7eatQsS9
4B5qoTZmjmgjTF+N5wAAAECNSXZ3hyF6ArXwEsyro1EhoIqrsDJJagPLDtuXCiM8
1HOsd4LSZlb3xokKjybt5q1CxL3gHmqhNmaOaCNMX43nAAAAFGVkMjU1MTkta2V5
LTIwMjEwMjExAQIDBAUGBwgJ
-----END OPENSSH PRIVATE KEY-----

I get an error that the padding is not valid. I used putty openssh-export to create the file. Any Idea? Also I have troube getting the correct seed of this PK file. Its not encoded with a password. it seems like there is some extra computation needed to extract the seed. I also posted a request on how to calculate the seed on stack exchange.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
oberstetcommented, Apr 9, 2022

the padding thing should be fixed via https://github.com/crossbario/autobahn-python/pull/1543

1reaction
konsultanercommented, Feb 20, 2021

I worked it out. My putty file reader still was wrong. I kept the length offset bytes in the resulting key. So taking the first 32byte is korrekt. Ther is still an issue with your padding evaluation or putty somehow does it wrong. I have no idea. I’ll keep digging.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"UNPROTECTED PRIVATE KEY FILE!" Error using SSH into ...
Right click on the pem file. · Select security tab --> Click on the Advanced button --> Disable inheritance --> Remove all inherited...
Read more >
Troubleshoot "Permission denied (Publickey)" or ...
I'm receiving "Permission denied (publickey)" or "Authentication failed, permission denied" errors when trying to access my EC2 instance.
Read more >
How To Fix Permission Error When SSH into Amazon EC2 ...
How to fix the unprotected private key file error? · 1) Find your .pem key file on your computer. · 2) Open Terminal...
Read more >
EC2 instance always ask me to enter passphrase for the pem ...
Here the problem arises. The solution is -> Always use the same text editor in both the machines to copy and paste the...
Read more >
What is the right file permission for a .pem file to SSH and SCP
WARNING: UNPROTECTED PRIVATE KEY FILE! Permissions 0660 for 'sentiment.pem' are too open. It is recommended that your private key files are NOT ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found