0

We know the private key should not be longer than 256 bits. But if I choose one longer key X, for example 300 bits key, and use it generate a pub key and address. Can I use X to generate the standard private key Y to signature the address properly?

    1

    The question doesn't make a lot of sense. If you have something which is not a valid private key, you cannot generate a public key and an address from it.

    That said, given a 300-bit string, you can interpret it as a private key in any way you want. For example, you can treat it as an integer, and the corresponding private key will be the remainder of this number divided by the order of the group. You can use this private key for both creating the address and later signing. And if you want, nothing is stopping you from storing the original 300-bit string, to be converted to the private key whenever needed. Not much sense in doing any of this, though.

    • thank you. You just give me the answer: "the corresponding private key will be the remainder of this number divided by the size of the field " – nova diki Aug 14 '18 at 10:48
    • Correction: the remainder of this number divided by the order of the curve group. There is a field involved to (for the curve's point coordinate system), but its size is not exactly the same as the curve order. – Pieter Wuille Oct 14 '18 at 0:38
    • @PieterWuille: Right! Fixed. – Meni Rosenfeld Oct 15 '18 at 0:53
    0

    You're describing deterministic wallets where a seed can be used to generate an extended private key and from that you derive child private keys. The seed can be any size you like. It gets run through sha512sum to derive the xpriv.

      Your Answer

      By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

      Not the answer you're looking for? Browse other questions tagged or ask your own question.