You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the moment I have a workaround - I just regex-replace the DEK-Info-Line and make the salt uppercase before I pass it to the PrivateKey constructor :-D
Unfortunately the EC private key makes problem while parsing the ANS1 data. I will have to investigate the problem and open another ticket when I find out what's wrong.
[edit] deleted, because, the problem was in my code
I was (accidentally) using Portable.BouncyCastle 1.9.0, because another NuGet packaged depends on it. There are pretty many projects out there which still use Portable Bouncy Castle because it seems to work better with Unity.
And 1.9.0 created the lowercase salt.
I'm now rename the Portable.BouncyCastle package in my project, so I can use BouncyCastle.Cryptography 2.4.2 which in fact produces the salt in uppercase.
Activity
Rob-Hague commentedon Nov 13, 2024
Thanks, there is actually a very old PR for this: #179 I will get it merged when I next find time
wech71 commentedon Nov 13, 2024
Thanks.
For the moment I have a workaround - I just regex-replace the DEK-Info-Line and make the salt uppercase before I pass it to the PrivateKey constructor :-D
Unfortunately the EC private key makes problem while parsing the ANS1 data. I will have to investigate the problem and open another ticket when I find out what's wrong.[edit] deleted, because, the problem was in my code
Rob-Hague commentedon Nov 19, 2024
I merged that PR but I did note that
a) BouncyCastle outputs the salt in uppercase these days (https://github.com/bcgit/bc-csharp/blob/63b2e6e5bd596acea200f70c0db8e376f958806b/crypto/src/openssl/MiscPemGenerator.cs#L252); and
b) you are using a rather old cipher scheme
wech71 commentedon Nov 19, 2024
Thank you.
I was (accidentally) using Portable.BouncyCastle 1.9.0, because another NuGet packaged depends on it. There are pretty many projects out there which still use Portable Bouncy Castle because it seems to work better with Unity.
And 1.9.0 created the lowercase salt.
I'm now rename the Portable.BouncyCastle package in my project, so I can use BouncyCastle.Cryptography 2.4.2 which in fact produces the salt in uppercase.