Byte size of cosmos address/public key/signature


#1

Hi,

I’m using cosmos-sdk for one of my projects. I want to know the number of bytes in cosmos address, public key and signature. Can someone please let me know if you know details about this.

Thanks


#2

Cosmos addresses are always 20 bytes/160 bits.

Cosmos public keys depend on the type of cryptography used. The scheme uses secp256k1 keys by default which are 33 bytes.

Signature are genereally 64 bytes.


#3

Thanks @zaki

Cosmos uses Bech32 encoding for addresses, will this change the size of the addresses and public keys?


#4

bech32 is just we encode values when displayed to humans, it doesn’t affect size on disk/ wire.