Is my Ledger safe, or is there a spy implant in it?
Detecting a spy implant without cracking your device open is possible. I'm working on a device to make it cheap and easy, and will publish the PCB and specs so anyone will be able to build it.
Ledger Flex sold at Singapore Airport confirmed to contain a spy implant!
@BenYorke found suspicious marks on his @Ledger and sent it to me rather than using it, that was probably the best decision here.
@moo9000 Left to right: e-SIM, CPU with firmware able to recognize Ledger's font as shown on screen and capture words as they appear on screen, and a LTE module that can connect once the seed has been fully captured.
This looks like this could be exactly what I'm investigating. Anyone affected, please contact me or open your ledger and send me pictures so we can confirm if there's a bug in there (pictures: ledger board on top, spy implant below).
Need free data? Buy a cheap ledger off a dodgy seller, pull the sim out of the spy implant and enjoy while you can (law enforcement may visit you thinking you are the one making these).
As part of the rebranding Yoroi→SecondFi, the app was fully revamped and version bumped from 7.x.x to 10.x.x.
The code was moved from its old cryptoxide (no commits in 4 years) version to a pure-JS based on noble/curves.
The signature code for ed25519 in there is fine, but the prefix which was supposed to be passed is lost in the adapter. It's being passed, but never assigned in the adapter, so an empty prefix is passed to hashDomainToScalar() resulting in the nonce being the transaction itself only.
SecondFi security issue wasn't a nonce reuse, or a weak key, but a public nonce used to sign keys. The Ed25519 standard defines how you are supposed to generate nonces, using a secret prefix. SecondFi didn't have a secret prefix at all, meaning anyone could derive the nonce by just seeing a signed transaction.
Rolling your own crypto code is dangerous, I'm guessing the wallet wasn't audited, resulting in this problem going undetected.
Read more at Tibane: