<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otpGarmin/source/crypto/SelfTest.mc, branch v0.2.0</title>
<subtitle>OTP Wallet for Garmin Connect IQ: offline one-time passwords and barcodes.</subtitle>
<id>https://git.cirakg.xyz/otpGarmin/atom?h=v0.2.0</id>
<link rel='self' href='https://git.cirakg.xyz/otpGarmin/atom?h=v0.2.0'/>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/otpGarmin/'/>
<updated>2026-10-18T21:44:18+00:00</updated>
<entry>
<title>feat(crypto): add SHA-512, HMAC, PBKDF2, HKDF, AES-256 records and self-test</title>
<updated>2026-10-18T21:44:18+00:00</updated>
<author>
<name>cirakg</name>
<email>cirakg@cirakg.xyz</email>
</author>
<published>2026-10-18T21:44:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/otpGarmin/commit/?id=e47ae684101981a7c20f3270994a61944059c825'/>
<id>urn:sha1:e47ae684101981a7c20f3270994a61944059c825</id>
<content type='text'>
- Sha512: FIPS 180-4 in Monkey C (no native SHA-512), rotations inlined
  with precomputed masks; constants derived from the primes, not typed.
- Hmac: RFC 2104 over SHA-1/256/512 (native HMAC only supports SHA-256).
- Kdf: resumable PBKDF2-HMAC-SHA256 job with calibration bounds
  (2,000-200,000 iterations) and HKDF-SHA256.
- Aes: CBC with PKCS#7 over the native cipher; AES-256 chosen.
- SealedBox: encrypt-then-MAC records (HKDF-split keys, length-prefixed
  aad, constant-time tag check before decryption).
- SelfTest: known-answer tests for every primitive at start-up.
- Bytes (wipe, constant-time equal), Clock (2038-safe widening, trusted
  clock), Jobs (bounded steps against the watchdog, timer runner).

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
