Giter Site home page Giter Site logo

generates malformed keys about ecdsatool HOT 5 OPEN

kaniini avatar kaniini commented on September 24, 2024
generates malformed keys

from ecdsatool.

Comments (5)

grawity avatar grawity commented on September 24, 2024 1

Both formats should work the same – the only difference is that ecdsatool includes the curve parameters explicitly, while openssl only names the curve's OID. (See cat *.key | openssl ec -noout -text.)

You can use openssl ecparam -param_enc explicit to change this, or feed a key through openssl ec -param_enc ... to convert it to the other format.

The "EC PARAMETERS" block is redundant, it merely repeats the same information as in "EC PRIVATE KEY". (See cat *.key | openssl ecparam -noout -text.)

The slashes and AAAAs are fine as well; some of the key parameters just happen to have series of 00:00:00's and ff:ff:ff's, corresponding to AAAA and //// in Base64.


I don't know if the "EC PRIVATE KEY" format is standard or OpenSSL-specific, but programs that claim to support it should support reading all key formats. (So it's a Limnoria bug really.)

There is another key format, PKCS#8, which might be supported better (or worse) in some programs. Feed a key through openssl pkey or openssl pkcs8 -topk8 -nocrypt to get it in PKCS#8 form. Note that it also can have either explicit or named curve parameters.

from ecdsatool.

kaniini avatar kaniini commented on September 24, 2024

Sorry. Need way more proof than that, because ecdsatool generates keys the same way.

from ecdsatool.

Mikaela avatar Mikaela commented on September 24, 2024

I don't know anything else than what is said in attached log. I can probably paste the private key here as it's not used anywhere and I didn't remove it.

-----BEGIN EC PRIVATE KEY-----
MIIBKAIBAQQgpCPoOrr6ie0svfT5xFOLvxJIHQyRzV2dX1ZXGCg5aR6ggdowgdcC
AQEwLAYHKoZIzj0BAQIhAP////8AAAABAAAAAAAAAAAAAAAA////////////////
MFsEIP////8AAAABAAAAAAAAAAAAAAAA///////////////8BCBaxjXYqjqT57Pr
vVV2mIa8ZR0GsMxTsPY7zjw+J9JgSwMVAMSdNgiG5wSTamZ44ROdJreBn36QBCED
axfR8uEsQkf4vOblY6RA8ncDfYEt6zOg9KE5RdiYwpYCIQD/////AAAAAP//////
////vOb6racXnoTzucrC/GMlUQIBAaEkAyIAA+8zLmVqAnGozwd2fhaktCPI/Ur7
uwIlWIDxO95rC3R7
-----END EC PRIVATE KEY-----

from ecdsatool.

Mikaela avatar Mikaela commented on September 24, 2024

comparing to openssl generated one, that is missing ec parameters and is longer and those slashes and AAAABAAAs don't look like they belong there.

-----BEGIN EC PARAMETERS-----
BggqhkjOPQMBBw==
-----END EC PARAMETERS-----
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIH9MqM8q5mXXfwDjFn7Q+0ubrAEbnSRz/HPugkGUkXJToAoGCCqGSM49
AwEHoUQDQgAEv+IUruHzSU+mXY1xjFE4yLdzRLghG3QiBODKk5kI58tQnlSZEnwE
Jge/satHBZ6HrFQ/xRmeHrA05dI4OEpAdg==
-----END EC PRIVATE KEY-----

from ecdsatool.

kaniini avatar kaniini commented on September 24, 2024

ecdsatool keys are meant to be used with ecdsatool. they may or may not be compatible with other scripts. not a bug.

from ecdsatool.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.