n_signer CYD Web Serial

Connection

Connect to the CYD (CH340 serial) via Web Serial, then exercise every algorithm and verb in the n_signer API. Chrome/Edge/Brave/Opera only.

Disconnected

    

get_info (version / capabilities)

No approval required. Safe to call before the mnemonic is loaded.


    

get_public_key (algorithm)


    

nostr_get_public_key


    

sign / verify


    

encapsulate / decapsulate (ml-kem-768)


    

derive_shared_secret (x25519)


    

derive (secp256k1 HMAC-SHA256)


    

nostr_sign_event


    

nostr_mine_event

Slow on ESP32 — uses single-threaded PoW. Keep difficulty low.


    

nostr_nip04_encrypt / decrypt


    

nostr_nip44_encrypt / decrypt


    

encrypt / decrypt (otp)

OTP pad is derived from the mnemonic on the CYD. Offset advances monotonically.


    
n_signer
ready
Web Serial

n_signer CYD Web Serial Demo

A browser control panel for the CYD (ESP32-2432S028) signer firmware. Speaks the n_signer JSON-RPC protocol over Web Serial at 115200 baud.

Getting started

1. Plug the CYD into a USB port (CH340 enumerates as /dev/ttyUSB*).

2. Click Connect Web Serial and pick the CYD port.

3. get_info fires automatically and reports firmware version + supported verbs.

4. Enter a mnemonic on the CYD touchscreen to enable the signing verbs.

Auth envelope

Every request is signed with a demo secp256k1 key (priv = 0x0102…2020). The CYD verifies the kind-27235 auth event and replays-protects by event id.

Transports

Frames are 4-byte big-endian length + UTF-8 JSON payload. Same wire format as the host Unix-socket and TCP transports.

demo v1