Avatar
ᴛʜᴇ ᴅᴇᴀᴛʜ ᴏꜰ ᴍʟᴇᴋᴜ
4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f
ʙoarᴅ cerᴛɪꜰɪeᴅ ᴛecʜno-ᴘʜaɢe. mʏ mɪnᴅ ɪs ʜunɢrʏ, anᴅ ꜰeeᴅs on noveʟᴛʏ. ᴅo ʏou ʜave someᴛʜɪnɢ ᴛo sʜare ᴛʜaᴛ ɪ never ʜearᴅ? "𝔅𝔢 𝔠𝔞𝔯𝔢𝔣𝔲𝔩 𝔣𝔬𝔯 𝔫𝔬𝔱𝔥𝔦𝔫𝔤; 𝔟𝔲𝔱 𝔦𝔫 𝔢𝔳𝔢𝔯𝔶 𝔱𝔥𝔦𝔫𝔤 𝔟𝔶 𝔭𝔯𝔞𝔶𝔢𝔯 𝔞𝔫𝔡 𝔰𝔲𝔭𝔭𝔩𝔦𝔠𝔞𝔱𝔦𝔬𝔫 𝔴𝔦𝔱𝔥 𝔱𝔥𝔞𝔫𝔨𝔰𝔤𝔦𝔳𝔦𝔫𝔤 𝔩𝔢𝔱 𝔶𝔬𝔲𝔯 𝔯𝔢𝔮𝔲𝔢𝔰𝔱𝔰 𝔟𝔢 𝔨𝔫𝔬𝔴𝔫 𝔲𝔫𝔱𝔬 𝔊𝔬𝔡. 𝔄𝔫𝔡 𝔱𝔥𝔢 𝔭𝔢𝔞𝔠𝔢 𝔬𝔣 𝔊𝔬𝔡, 𝔴𝔥𝔦𝔠𝔥 𝔭𝔞𝔰𝔰𝔢𝔱𝔥 𝔞𝔩𝔩 𝔲𝔫𝔡𝔢𝔯𝔰𝔱𝔞𝔫𝔡𝔦𝔫𝔤, 𝔰𝔥𝔞𝔩𝔩 𝔨𝔢𝔢𝔭 𝔶𝔬𝔲𝔯 𝔥𝔢𝔞𝔯𝔱𝔰 𝔞𝔫𝔡 𝔪𝔦𝔫𝔡𝔰 𝔱𝔥𝔯𝔬𝔲𝔤𝔥 ℭ𝔥𝔯𝔦𝔰𝔱 𝔍𝔢𝔰𝔲𝔰" - 𝔓𝔥𝔦𝔩𝔦𝔭𝔭𝔦𝔞𝔫𝔰 4:6-7 ᴛᴇʟᴇɢʀᴀᴍ: @mleku1 ᴍᴀᴛʀɪx: @mleku17:matrix.org ꜱɪᴍᴘʟᴇx: https://smp15.simplex.im/a#PPkiqGvf5kZ3AbFWBh3_tw1b_YgvnkSgDEc_-IuuRWc

the keys are 33 bytes for standard ECDSA public keys and 32 bytes for BIP340 compliant pubkeys, they have the extra bit (it's an extra byte just for 1 bit) as it uses a funny scheme which essentially shaves one bit of security for a much neater format, the way it works is that if it comes out odd (the first, least significant bit) then it inverts (bitwise NOT) and then it can omit that bit and it's a neat 32 bytes, or equal to 4x64 bit words

the schnorr signatures are 64 bytes long, and ecdsa signatures can be anywhere between 62 and 67, iirc, but they are not a consistent length unlike Schnorr, and usually they are 65 bytes, but not always

the reason for the change is that computing it and splicing together protocol messages is easier if you don't have to overflow into another 8 bit word... iirc, the actual modular arithmetic done for schnorr signatures and public keys is done on 4x64bit words, you can see this if you follow the computations into the back end, inside the key is a pair of ModNScalar i forget exactly, i haven't honestly gone that deep into it except to know that you can do some neat things other than just signatures and pubkeys with them, like the scheme bitcoin uses that recovers the key instead of checking a key matches a signature - this was done to save space - and it tests the same because you compare your pubkey with the key it generates, it generates a key either way but it has to match the one you want - but never mind that, that's ancient, NIST/NSA ECDSA bullcrap because they were too cheap to buy out schnorr for his far more efficient algorithm patent

that's not the one you use

and see, the abomination...

decred

here is the proper version, i cleaned all of that up from btcd:

https://mleku.online/git/ec

you need to use the functions in the "schnorr" folder, in my code it is used many times so you can also see there: https://github.com/Hubmakerlabs/replicatr - in the pkg/nostr folder is all the nostr things including event handling, in the event folder is shown the correct method to make and verify BIP-340 signatures and pubkeys

the readme is slightly incorrect also

this version of it DOES fully pass all of the BIP-340 tests, there was an extra 4 that involve variable length messages and it passes them too, i tried to get this fixed in the original in btcd/btcutil but roasbeef said "it wasn't necessary to complete" the changes were simple anyhow, and my library is fully compliant to BIP340, even if you are only ever gonna use it on 32 byte hashes

easy way to avoid this: don't deal in shitcoins, and don't use shitcoin casinos to do exchanges

metamorphosis... i started reading that book but it seemed kinda retarded

probably there is a more detailed account of this incident and it is the origin of the abomination of copyright law

copyright is almost exclusively used by rentseekers and does not in fact benefit creators

just look at the huge publisher monopolies that exist and have existed throughout the 20th century... HMV, RCA, Warner Bros - many many movies and stories have been written about the exact subject of how the copyright law is abused to the detriment of creators

that's not the one you use

and see, the abomination...

decred

here is the proper version, i cleaned all of that up from btcd:

https://mleku.online/git/ec

you need to use the functions in the "schnorr" folder, in my code it is used many times so you can also see there: https://github.com/Hubmakerlabs/replicatr - in the pkg/nostr folder is all the nostr things including event handling, in the event folder is shown the correct method to make and verify BIP-340 signatures and pubkeys

Replying to Avatar hodlbod

Ok I need some more help, nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyv9kh2uewd9hj7qghwaehxw309aex2mrp0yh8qunfd4skctnwv46z7qgewaehxw309aex2mrp0yh8xmn0wf6zuum0vd5kzmp0qqsdr8lv2sp86ztsv4yz9q9wz7ng6zk40u84cta8fcj08kamrek9f9gsq8th3 nostr:nprofile1qyvhwumn8ghj7un9d3shjtndd3jkkafwdahxc6twv5hszyrhwden5te0vyhxummn9ekx7mp0qythwumn8ghj7ct5d3shxtnwdaehgu3wd3skuep0qqsyeqqz27jc32pgf8gynqtu90d2mxztykj94k0kmttxu37nk3lrktctmwr4h nostr:nprofile1qyd8wumn8ghj7urewfsk66ty9enxjct5dfskvtnrdakj7qgmwaehxw309aex2mrp0yh8wetnw3jhymnzw33jucm0d5hsqgpm7rrrljungc6q0tuh5hj7ue863q73qlheu4vywtzwhx42a7j9n5zr9h9m

I'm trying to decrypt an event using nip44, but I'm getting an "invalid hmac" warning on a valid payload (at least, according to the javascript implementation). Any hints? Code below.

func getNip44ConversationKey(sk string, pk string) []byte {

sk_bytes, _ := hex.DecodeString("02" + sk)

sk_obj := secp256k1.PrivKeyFromBytes(sk_bytes)

pk_bytes, _ := hex.DecodeString("02" + pk)

pk_obj, _ := secp256k1.ParsePubKey(pk_bytes)

return nip44.GenerateConversationKey(sk_obj, pk_obj)

}

func getNip44Rumor(sk string, wrap *nostr.Event) (*nostr.Event, error) {

wrap_key := getNip44ConversationKey(sk, wrap.PubKey)

nip44.Decrypt(wrap_key, wrap.Content) // invalid hmac

...

}

if you are using that abomination that the security audit said had no bounds checking, i wouldn't actually trust it

i'm working on getting this going today so when i'm done i'll show you the fixed code

my guess though, is that the bytes have been mishandled somewhere just wouldn't doubt it's in the nip44 encryption code, did anyone actually test it? has it got test units?

no problem, i can git pull now and test commits before i settle them at show time :D

yes, i have a fortnightly meeting coming up and i almost had DMs working that day now i have a chatbot with an auth workaround for NIP-42 madness and tomorrow i'll be implementing some commands and the actual ACL (will be based on a special private event type stored and not published by the relay)

hurrah, i have a stable base to use to demo my relay

*whew* finally

man, this stretched my day out a lot... i need some sleep real bad now

nostr:nprofile1qyfhwumn8ghj7mmxve3ksctfdch8qatz9uqsuamnwvaz7tmwdaejumr0dshszxthwden5te0dphkgmrzdajzumn0wd68yvfwvdhk6tcqyztuwzjyxe4x2dwpgken87tna2rdlhpd02va5cvvgrrywpddnr3jyhdw0my

as you can see it's not picking up the kind 0s and pulling the data

i've tried with and without the image proxy and dufflepud, to no avail, i can only assume that there's something on the other end that's in the way

it also isn't connecting to my relay to send events to it for the chat

probably it will just work tomorrow morning when i try it but my point here is not to run some competitor to your site, just to not be subject to trying to do a demo of my relay and you upload a new version and my demo is not happening

if i need to run my own dufflepud and image proxy, ok, fine but is that what's causing this?

url is https://coracle.mleku.online and yes it's running right now you can see it

and now it's working sorry to @ you for nothing

was clearly due to bugs in prior commits, now running current

nostr:nprofile1qyfhwumn8ghj7mmxve3ksctfdch8qatz9uqsuamnwvaz7tmwdaejumr0dshszxthwden5te0dphkgmrzdajzumn0wd68yvfwvdhk6tcqyztuwzjyxe4x2dwpgken87tna2rdlhpd02va5cvvgrrywpddnr3jyhdw0my

as you can see it's not picking up the kind 0s and pulling the data

i've tried with and without the image proxy and dufflepud, to no avail, i can only assume that there's something on the other end that's in the way

it also isn't connecting to my relay to send events to it for the chat

probably it will just work tomorrow morning when i try it but my point here is not to run some competitor to your site, just to not be subject to trying to do a demo of my relay and you upload a new version and my demo is not happening

if i need to run my own dufflepud and image proxy, ok, fine but is that what's causing this?

url is https://coracle.mleku.online and yes it's running right now you can see it

there is far bigger problems at play if someone just taking your code and using it somewhere else makes them a lot more money than you

probably they have other things going on, some might be moral, some might be corrupt

the act of copying and deploying the code is not part of the corrupt part

it is ungentlemanly, perhaps, if all else is in order but usually there's some corruption going on

don't make the mistake of trying to evaluate a situation based on simple rules when the circumstances are never ever simple

if you see someone doing this who also displays psychopathic tendencies, then they probably have stolen resources or corrupt access to other stolen resources and where should you be looking for the problem?

the little guy who gets lucky running your code on their server?

or the cabal of shady motherfuckers who are already flush with cash and are doing it to suppress your earning capacity?

copying an idea is a cost to the copier

i can't believe you don't know about the original copyright case

dude sat down for 3 months copying the vulgate, first english translation of the bible

guy who lent it to him sued him and the king ruled in favour of the owner of the book saying the book was like a cow and the offspring of the cow was his property

for real, you can look it up

3 months. imagine... 3 months you sat there with your quill and ink, spent who knows how much of your time and resources to copy this thing and then the king says the whole copy you made goes to the guy who lent you the book?

pretty steep rent bro

enforced by who?

God?

you haven't thought this through

open source is a great way for corps to get free testers on one side but on teh other side that's how science works too

just cos you have teh code doesn't mean you know how to deploy it or how to attract users to bring in the money, and plus... that's the whole thing about bitcoin and lightning, it is a mechanism for that, which didn't exist before and as such we were saddled with the advertising monetisation model and shitty subscriptions and... lastly

how do you expect people to be able to trust to run your code if you only provide it in binary format or something? like, come on, think about it, the whole closed source, proprietary copyright thing is a fraud from the get go but it's not just a fraud it's something that is just begging to be broken

how long does it take for any given closed source software to be cracked so anyone can run it without programmatically enforced limits?

about 5 days i bet

there's guys who have been doing this for literally 30-40 years and they aren't gonna quit because that's their sport, by day they write embedded software

i did this blunder years ago buying bromo dragonfly and it turned out there was like 10 people in the world who knew about it who knew about the dark web

but you have to copy that file to each user who uses it to run it

not such a big problem for relays

but clients

lol

then what?

ideas are free, even specific implementations of ideas

the physical thing generated by the implementation is the thing that is scarce, because it has to be worth doing

btw not sure if you noticed but it also sometimes just jammed up and stopped posting events to relays until you refreshed then it made you log in again

that crypto audit was hilarious

didn't mean anything, idk what the fuck they even did it for

the NIP-44 #golang impl is awful, i've pulled it into my codebase but i will be refactoring it to be sane, absolutely awful code, like C programmer style, including wild lack of bounds checking