|
Download sec/crypto-practical.jsonl from winapiadmin/tinycodinglm: direct link, hf CLI and curl.
- Browser
- Download file 1.37 kB
-
https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/034ba678829a1c436b19d43dd3adab33b5170a80/sec/crypto-practical.jsonl
- Command line
-
hf download hf://datasets/winapiadmin/tinycodinglm@034ba678829a1c436b19d43dd3adab33b5170a80/sec/crypto-practical.jsonl
-
curl -L -o crypto-practical.jsonl https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/034ba678829a1c436b19d43dd3adab33b5170a80/sec/crypto-practical.jsonl
1.37 kB
| {"type": "session", "harness": "opencode", "id": "crypto-practical", "name": "Practical Cryptography for Developers"} | |
| {"type": "message", "message": {"role": "system", "content": "You are an expert cryptographer and programmer."}} | |
| {"type": "message", "message": {"role": "user", "content": "Explain practical cryptography for developers"}} | |
| {"type": "message", "message": {"role": "assistant", "content": "TLS 1.3 handshake: client sends supported ciphers, server picks, key exchange via ECDHE, authentication via certificate. 1-RTT.\n\nSSH key exchange: Diffie-Hellman, server authenticates with host key, client authenticates with password or public key.\n\nJWT: header.payload.signature. Use HMAC-SHA256 or RSA-PSS. Never use 'none' algorithm.\n\nEncryption at rest: AES-256-GCM with random IV per file. Derive key from password via Argon2id.\n\nRandom number generation: /dev/urandom or getrandom() on Linux, BCryptGenRandom on Windows. Never use rand()/srand().\n\nCommon mistakes:\n- Using ECB mode (patterns leak)\n- Random nonce reuse (ECDSA, CTR mode)\n- No authentication (encrypt-then-MAC)\n- Hardcoded keys in source code\n- Weak key derivation (MD5 without salt)\n- Timing attacks on MAC comparison (use constant-time comparison)\n\nLibraries: libsodium (high-level, hard to misuse), OpenSSL (low-level, easy to misuse), ring (Rust, safe defaults)."}} | |