Is it possible to get the standard private key from a too long private key?

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?

nova diki

Posted 2018-08-14T10:18:11.243

Reputation: 1

Answers

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.

Meni Rosenfeld

Posted 2018-08-14T10:18:11.243

Reputation: 18 542

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 2018-08-14T10:48:36.033

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 2018-10-14T00:38:51.660

@PieterWuille: Right! Fixed.Meni Rosenfeld 2018-10-15T00:53:24.780

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.

Abdussamad

Posted 2018-08-14T10:18:11.243

Reputation: 1 850