<p>So everyone talks about Schnorr signatures and Taproot when talking about Bitcoin. I would like to know if there is any standard that they will use to store the keys used in this algorithm. And also I would like to know if there is any standard for storing the signature. Thanks :)</p>

CC BY-SA 4.0
2021-08-24T21:27:51.570Z
I don't know for Bitcoin specific, but note that how a private key is stored is generally left up to the application; as the private key is usually not transported anywhere, compatibility is usually not of much importance. Have you looked at any specific Bitcoin specifications already?
Maarten Bodewes
CC BY-SA 4.0
2021-08-25T12:13:16.400Z
There are several standards for *deriving* keys from seeds (including BIP 39 for seed phrases, BIP 32 for the key derivation algorithms and the concept of master keys, BIP 86 for standard derivation paths for taproot key based outputs, ...). Typically software will store private keys in one of these (seed phrases, master keys, or extended private keys), and public keys in whatever form they're used (possibly as addresses). Is this the kind of information you're looking for, or something else?
Pieter Wuille
CC BY-SA 4.0
2021-08-25T18:33:26.570Z
(Maybe this is not your question but) BIP340 actually specifies everything you're looking for. For example, public keys are byte arrays of length 32. So this is already a serialized format. Just store the 32 byte array. For details, see the pubkey generation algorithm: https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki#public-key-generation It uses the *bytes()* helper function (also defined in the BIP), which takes care of the serialization. Is this what you're looking for?
real-or-random
CC BY-SA 4.0
2021-08-27T13:25:18.923Z
I would like to know if there is any standard like let's say PEM for that or anything. I know it specifies that they are byte arrays of length 32. But is it safe to store only the byte array in a file let's say?
Razvan Marian
<wallet><private-key><schnorr-signatures>
Schnorr signature key storage
Razvan Marian
# Schnorr signature key storage

(Asked by: username_0 on 2021-08-24)

So everyone talks about Schnorr signatures and Taproot when talking about Bitcoin. I would like to know if there is any standard that they will use to store the keys used in this algorithm. And also I would like to know if there is any standard for storing the signature. Thanks :)

**Tags:** wallet, private-key, schnorr-signatures

> **Comments:**
> **username_1**: I don't know for Bitcoin specific, but note that how a private key is stored is generally left up to the application; as the private key is usually not transported anywhere, compatibility is usually not of much importance. Have you looked at any specific Bitcoin specifications already?  
> **username_2**: There are several standards for *deriving* keys from seeds (including BIP 39 for seed phrases, BIP 32 for the key derivation algorithms and the concept of master keys, BIP 86 for standard derivation paths for taproot key based outputs, ...). Typically software will store private keys in one of these (seed phrases, master keys, or extended private keys), and public keys in whatever form they're used (possibly as addresses). Is this the kind of information you're looking for, or something else?  
> **username_3**: (Maybe this is not your question but) BIP340 actually specifies everything you're looking for. For example, public keys are byte arrays of length 32. So this is already a serialized format. Just store the 32 byte array. For details, see the pubkey generation algorithm: https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki#public-key-generation It uses the *bytes()* helper function (also defined in the BIP), which takes care of the serialization. Is this what you're looking for?  
> **username_0**: I would like to know if there is any standard like let's say PEM for that or anything. I know it specifies that they are byte arrays of length 32. But is it safe to store only the byte array in a file let's say?  

---

## 0 answers

