mleku on Nostr: not sure if this is actually what the NIP means - the encrypted bytes are encoded in ...
not sure if this is actually what the NIP means - the encrypted bytes are encoded in base64 and you have to pad base64... it is 6 bits per character so it's 3 bytes per 4 characters, and it uses = as the padding character iirc
same thing happens with base/bech32, 5 bits per cipher and thus the nearest divisible by 8 to zero is 40, which is 8 characters, you can leave the padding out if you designate which end is start/end, and pad there, this is how bech32 encoding does things in fact
technically you could do the same thing with base64 but that would require a customized codec
Published at
2024-07-26 14:47:45Event JSON
{
"id": "be0b5d02d7f28b0f08e3ae80f7b6de54ee490610e03aa88fa9256f335582539c",
"pubkey": "4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f",
"created_at": 1722005265,
"kind": 1,
"tags": [
[
"p",
"70122128273bdc07af9be7725fa5c4bc0fc146866bec38d44360dc4bc6cc18b9",
"wss://greensoul.space/",
"buttercat1791"
],
[
"p",
"036533caa872376946d4e4fdea4c1a0441eda38ca2d9d9417bb36006cbaabf58",
"wss://relay.nostr.band/",
"ChipTuner"
],
[
"e",
"8d7e2dc4adff164bec4d0cdf33b5c8ffd7f38e198bfadde648eabb7f80706789",
"wss://relay.nostr.band/",
"root"
],
[
"e",
"13413b0be8b61c0de0522bae5ec434685f6b2c6f205cf09c97bd1f0dbd19ab05",
"wss://relay.nostr.band/",
"reply",
"036533caa872376946d4e4fdea4c1a0441eda38ca2d9d9417bb36006cbaabf58"
],
[
"client",
"Coracle",
"31990:97c70a44366a6535c145b333f973ea86dfdc2d7a99da618c40c64705ad98e322:1685968093690"
]
],
"content": "not sure if this is actually what the NIP means - the encrypted bytes are encoded in base64 and you have to pad base64... it is 6 bits per character so it's 3 bytes per 4 characters, and it uses = as the padding character iirc\n\nsame thing happens with base/bech32, 5 bits per cipher and thus the nearest divisible by 8 to zero is 40, which is 8 characters, you can leave the padding out if you designate which end is start/end, and pad there, this is how bech32 encoding does things in fact\n\ntechnically you could do the same thing with base64 but that would require a customized codec",
"sig": "3f3ecde7c6f84caee1d1802d6548b443fd959122fb3522ab32b01bd79d31b56e4a33016f3049f08200a8bdce9f689e6e486c180eb4ec089108bbd8370649b913"
}