private_key.private_numbers() gives you an object with a `private_value` attribute which is an integer.
Alex On Fri, Sep 15, 2017 at 6:09 PM, John Pacific <m...@johnpacific.com> wrote: > Sorry, asking questions for remote people. > I think he meant the actual numbers of the key pair. > > I found a class that does it in the API. I'm assuming, that I could > probably convert it to the bytes representation of it by doing something > along the lines of (presuming a 256bit curve a la secp256k1): > `PrivKeyNumber.to_bytes(32, byteorder='big')`. > > Does that make sense? > > On Sep 15, 2017 15:40, "Alex Gaynor" <alex.gay...@gmail.com> wrote: > >> I'm not sure what you mean by "raw bytes", keys can be generated and >> serialized as documented here: https://cryptography.io/ >> en/latest/hazmat/primitives/asymmetric/ec/#serialization >> Alex >> >> >> On Fri, Sep 15, 2017 at 3:11 PM, John Pacific <m...@johnpacific.com> wrote: >> >>> Hey there! >>> >>> Is there a good way to generate an ECDSA keypair and get the raw bytes >>> of those keys? >>> >>> _______________________________________________ >>> Cryptography-dev mailing list >>> Cryptography-dev@python.org >>> https://mail.python.org/mailman/listinfo/cryptography-dev >>> >>> >> >> >> -- >> "I disapprove of what you say, but I will defend to the death your right >> to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) >> "The people's good is the highest law." -- Cicero >> GPG Key fingerprint: D1B3 ADC0 E023 8CA6 >> >> >> _______________________________________________ >> Cryptography-dev mailing list >> Cryptography-dev@python.org >> https://mail.python.org/mailman/listinfo/cryptography-dev >> >> > _______________________________________________ > Cryptography-dev mailing list > Cryptography-dev@python.org > https://mail.python.org/mailman/listinfo/cryptography-dev > > -- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: D1B3 ADC0 E023 8CA6
_______________________________________________ Cryptography-dev mailing list Cryptography-dev@python.org https://mail.python.org/mailman/listinfo/cryptography-dev