| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository |
| route-controller | files |
| route-action | disambiguate |
| fetch-nonce | v2:851ecf8b-000e-51ec-030f-e21de2cf525f |
| current-catalog-service-hash | f3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb |
| request-id | 92AE:144939:202658:2BC348:6AFBFF7C |
| html-safe-nonce | 3bdf737b40210bdc9ccd4f045d0bab312929c588eb3af007ee842ffafe114070 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MkFFOjE0NDkzOToyMDI2NTg6MkJDMzQ4OjZBRkJGRjdDIiwidmlzaXRvcl9pZCI6Ijc3NzcxMjcyMjQzMjYyMjU3ODgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3fd4ac84baa42ea19687a686242f8e77af202fa59f5aab4d721f7ed2654f6881 |
| hovercard-subject-tag | repository:177790629 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | // |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/veorq/cryptocoding |
| twitter:image | https://opengraph.githubassets.com/0c84dc0a938e295e68a35083ec10c04c9c9372c21e87d8ac3189f4ddb576d693/veorq/cryptocoding |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0c84dc0a938e295e68a35083ec10c04c9c9372c21e87d8ac3189f4ddb576d693/veorq/cryptocoding |
| og:image:alt | Guidelines for low-level cryptography software. Contribute to veorq/cryptocoding development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | fa74413a1d84dac536fcca0740780bcbd3207bafec0e51873b73ff8e8cca032f |
| turbo-cache-control | no-cache |
| go-import | github.com/veorq/cryptocoding git https://github.com/veorq/cryptocoding.git |
| octolytics-dimension-user_id | 3204810 |
| octolytics-dimension-user_login | veorq |
| octolytics-dimension-repository_id | 177790629 |
| octolytics-dimension-repository_nwo | veorq/cryptocoding |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 177790629 |
| octolytics-dimension-repository_network_root_nwo | veorq/cryptocoding |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b3b5633a74535d9c23385512d534c66c8fde1907 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/veorq/cryptocoding#start-of-content |
| https://github.com/ |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fveorq%2Fcryptocoding |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fveorq%2Fcryptocoding |
| Sign up | https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=veorq%2Fcryptocoding |
| Reload | https://github.com/veorq/cryptocoding |
| Reload | https://github.com/veorq/cryptocoding |
| Reload | https://github.com/veorq/cryptocoding |
| veorq | https://github.com/veorq |
| cryptocoding | https://github.com/veorq/cryptocoding |
| Code | https://github.com/veorq/cryptocoding |
| Issues8 (8) | https://github.com/veorq/cryptocoding/issues |
| Pull requests2 (2) | https://github.com/veorq/cryptocoding/pulls |
| Actions | https://github.com/veorq/cryptocoding/actions |
| Projects | https://github.com/veorq/cryptocoding/projects |
| Security and quality | https://github.com/veorq/cryptocoding/security |
| Insights | https://github.com/veorq/cryptocoding/pulse |
| https://github.com/veorq/cryptocoding |
| cryptocoding | https://github.com/veorq/cryptocoding |
| Notifications | https://github.com/login?return_to=%2Fveorq%2Fcryptocoding |
| Fork93 (93) | https://github.com/login?return_to=%2Fveorq%2Fcryptocoding |
| Star1.2k (1.2k) | https://github.com/login?return_to=%2Fveorq%2Fcryptocoding |
| Readme | https://github.com/veorq/cryptocoding#readme-ov-file |
| Activity | https://github.com/veorq/cryptocoding/activity |
| 93 forks | https://github.com/veorq/cryptocoding/forks |
| Report repository | https://github.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Fveorq%2Fcryptocoding&report=veorq+%28user%29 |
| Branches | https://github.com/veorq/cryptocoding/branches |
| Tags | https://github.com/veorq/cryptocoding/tags |
| https://github.com/veorq/cryptocoding/branches |
| https://github.com/veorq/cryptocoding/tags |
| 40 Commits | https://github.com/veorq/cryptocoding/commits/master/ |
| https://github.com/veorq/cryptocoding/commits/master/ |
| README.md | https://github.com/veorq/cryptocoding/blob/master/README.md |
| README.md | https://github.com/veorq/cryptocoding/blob/master/README.md |
| README | https://github.com/veorq/cryptocoding |
| https://github.com/veorq/cryptocoding#cryptocoding |
| https://github.com/veorq/cryptocoding#table-of-contents |
| Cryptocoding | https://github.com/veorq/cryptocoding#cryptocoding |
| Compare secret strings in constant time | https://github.com/veorq/cryptocoding#compare-secret-strings-in-constant-time |
| Problem | https://github.com/veorq/cryptocoding#problem |
| Solution | https://github.com/veorq/cryptocoding#solution |
| Avoid branchings controlled by secret data | https://github.com/veorq/cryptocoding#avoid-branchings-controlled-by-secret-data |
| Problem | https://github.com/veorq/cryptocoding#problem-1 |
| Solution | https://github.com/veorq/cryptocoding#solution-1 |
| Avoid table look-ups indexed by secret data | https://github.com/veorq/cryptocoding#avoid-table-look-ups-indexed-by-secret-data |
| Problem | https://github.com/veorq/cryptocoding#problem-2 |
| Solution | https://github.com/veorq/cryptocoding#solution-2 |
| Avoid secret-dependent loop bounds | https://github.com/veorq/cryptocoding#avoid-secret-dependent-loop-bounds |
| Problem | https://github.com/veorq/cryptocoding#problem-3 |
| Solution | https://github.com/veorq/cryptocoding#solution-3 |
| Prevent compiler interference with security-critical operations | https://github.com/veorq/cryptocoding#prevent-compiler-interference-with-security-critical-operations |
| Problem | https://github.com/veorq/cryptocoding#problem-4 |
| Solution | https://github.com/veorq/cryptocoding#solution-4 |
| Prevent confusion between secure and insecure APIs | https://github.com/veorq/cryptocoding#prevent-confusion-between-secure-and-insecure-apis |
| Problem | https://github.com/veorq/cryptocoding#problem-5 |
| Bad Solutions | https://github.com/veorq/cryptocoding#bad-solutions |
| Solution | https://github.com/veorq/cryptocoding#solution-5 |
| Avoid mixing security and abstraction levels of cryptographic primitives in the same API layer | https://github.com/veorq/cryptocoding#avoid-mixing-security-and-abstraction-levels-of-cryptographic-primitives-in-the-same-api-layer |
| Problem | https://github.com/veorq/cryptocoding#problem-6 |
| Solution | https://github.com/veorq/cryptocoding#solution-6 |
| Provide high-level APIs | https://github.com/veorq/cryptocoding#provide-high-level-apis |
| When possible, avoid low-level APIs | https://github.com/veorq/cryptocoding#when-possible-avoid-low-level-apis |
| Clearly distinguish high-level APIs and low-level APIs | https://github.com/veorq/cryptocoding#clearly-distinguish-high-level-apis-and-low-level-apis |
| Use unsigned bytes to represent binary data | https://github.com/veorq/cryptocoding#use-unsigned-bytes-to-represent-binary-data |
| Problem | https://github.com/veorq/cryptocoding#problem-7 |
| Solution | https://github.com/veorq/cryptocoding#solution-7 |
| Clean memory of secret data | https://github.com/veorq/cryptocoding#clean-memory-of-secret-data |
| Problem | https://github.com/veorq/cryptocoding#problem-8 |
| Solution | https://github.com/veorq/cryptocoding#solution-8 |
| Use strong randomness | https://github.com/veorq/cryptocoding#use-strong-randomness |
| Problem | https://github.com/veorq/cryptocoding#problem-9 |
| Bad solutions | https://github.com/veorq/cryptocoding#bad-solutions-1 |
| Solution | https://github.com/veorq/cryptocoding#solution-9 |
| Always typecast shifted values | https://github.com/veorq/cryptocoding#always-typecast-shifted-values |
| Problem | https://github.com/veorq/cryptocoding#problem-10 |
| Solution | https://github.com/veorq/cryptocoding#solution-10 |
| https://github.com/veorq/cryptocoding#compare-secret-strings-in-constant-time |
| https://github.com/veorq/cryptocoding#problem |
| this | http://rdist.root.org/2009/05/28/timing-attack-in-google-keyczar-library/ |
| this vulnerability | http://codahale.com/a-lesson-in-timing-attacks/ |
| Keyczar crypto library | https://code.google.com/p/keyczar/ |
| OpenBSD libc | https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/memcmp.c?rev=1.6&content-type=text/x-cvsweb-markup |
| https://github.com/veorq/cryptocoding#solution |
| NaCl | https://nacl.cr.yp.to/verify.html |
| by @sneves | https://gist.github.com/sneves/10845247 |
| as-if rule | http://en.cppreference.com/w/cpp/language/as_if |
| Rust | https://github.com/klutzy/nadeko#why |
| Curve25519 built with MSCV 2015 | https://infoscience.epfl.ch/record/223794/files/32_1.pdf |
| https://github.com/veorq/cryptocoding#avoid-branchings-controlled-by-secret-data |
| https://github.com/veorq/cryptocoding#problem-1 |
| timing attack on square-and-multiply | http://users.belgacom.net/dhem/papers/CG1998_1.pdf |
| https://github.com/veorq/cryptocoding#solution-1 |
| CMOV | http://www.jaist.ac.jp/iscenter-new/mpc/altix/altixdata/opt/intel/vtune/doc/users_guide/mergedProjects/analyzer_ec/mergedProjects/reference_olh/mergedProjects/instructions/instruct32_hh/vc35.htm |
| https://github.com/veorq/cryptocoding#avoid-table-look-ups-indexed-by-secret-data |
| https://github.com/veorq/cryptocoding#problem-2 |
| https://github.com/veorq/cryptocoding#solution-2 |
| NaCl's | http://nacl.cr.yp.to/ |
| implementation | http://eprint.iacr.org/2009/129.pdf |
| Serpent | https://www.ii.uib.no/~osvik/serpent/ |
| possible | http://crypto.stackexchange.com/questions/55/known-methods-for-constant-time-table-free-aes-implementation-using-standard/92#92 |
| https://github.com/veorq/cryptocoding#avoid-secret-dependent-loop-bounds |
| https://github.com/veorq/cryptocoding#problem-3 |
| steal the private key | https://eprint.iacr.org/2011/232.pdf |
| https://github.com/veorq/cryptocoding#solution-3 |
| Heartbleed bug | http://heartbleed.com/ |
| https://github.com/veorq/cryptocoding#prevent-compiler-interference-with-security-critical-operations |
| https://github.com/veorq/cryptocoding#problem-4 |
| Tor | https://www.torproject.org/ |
| secret data | http://www.viva64.com/en/b/0178/ |
| https://github.com/veorq/cryptocoding#solution-4 |
| libottery | https://github.com/nmathewson/libottery/ |
| may not be sufficient | https://www.daemonology.net/blog/2014-09-05-erratum.html |
| https://github.com/veorq/cryptocoding#prevent-confusion-between-secure-and-insecure-apis |
| https://github.com/veorq/cryptocoding#problem-5 |
| https://github.com/veorq/cryptocoding#bad-solutions |
| https://github.com/veorq/cryptocoding#solution-5 |
| https://github.com/veorq/cryptocoding#avoid-mixing-security-and-abstraction-levels-of-cryptographic-primitives-in-the-same-api-layer |
| https://github.com/veorq/cryptocoding#problem-6 |
| https://github.com/veorq/cryptocoding#solution-6 |
| https://github.com/veorq/cryptocoding#provide-high-level-apis |
| https://github.com/veorq/cryptocoding#when-possible-avoid-low-level-apis |
| https://github.com/veorq/cryptocoding#clearly-distinguish-high-level-apis-and-low-level-apis |
| https://github.com/veorq/cryptocoding#use-unsigned-bytes-to-represent-binary-data |
| https://github.com/veorq/cryptocoding#problem-7 |
| https://github.com/veorq/cryptocoding#solution-7 |
| https://github.com/veorq/cryptocoding#clean-memory-of-secret-data |
| https://github.com/veorq/cryptocoding#problem-8 |
| core dump file | https://wiki.archlinux.org/title/Core_dump |
| bug in the process itself | https://en.wikipedia.org/wiki/Heartbleed |
| DMA attack | https://en.wikipedia.org/wiki/DMA_attack |
| cold boot attack | https://en.wikipedia.org/wiki/Cold_boot_attack |
| Spectre vulnerability | https://en.wikipedia.org/wiki/Spectre_(security_vulnerability) |
| https://github.com/veorq/cryptocoding#solution-8 |
| OpenBSD | https://man.openbsd.org/explicit_bzero |
| FreeBSD | https://www.freebsd.org/cgi/man.cgi?explicit_bzero |
| glibc | http://man7.org/linux/man-pages/man3/bzero.3.html |
| Windows | https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/aa366877(v=vs.85) |
| libsodium | https://download.libsodium.org/doc/memory_management |
| https://github.com/veorq/cryptocoding#use-strong-randomness |
| https://github.com/veorq/cryptocoding#problem-9 |
| failure | http://www.debian.org/security/2008/dsa-1571 |
| https://github.com/veorq/cryptocoding#bad-solutions-1 |
| Mersenne Twister | http://crypto.di.uoa.gr/CRYPTO.SEC/Randomness_Attacks.html |
| http://www.random.org/ | http://www.random.org/ |
| Diehard | http://www.stat.fsu.edu/pub/diehard/ |
| NIST's tests | http://csrc.nist.gov/groups/ST/toolkit/rng/stats_tests.html |
| backtracking resistance and prediction resistance | https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-90Ar1.pdf |
| https://github.com/veorq/cryptocoding#solution-9 |
| Ed25519 | http://ed25519.cr.yp.to/ |
| getrandom() | http://man7.org/linux/man-pages/man2/getrandom.2.html |
| arc4random() | https://man.openbsd.org/arc4random.3 |
| getentropy() | https://man.openbsd.org/getentropy.2 |
| getrandom() | https://www.freebsd.org/cgi/man.cgi?getrandom |
| getentropy() | https://www.freebsd.org/cgi/man.cgi?query=getentropy&sektion=3&apropos=0&manpath=FreeBSD+12.0-RELEASE+and+Ports |
| RAND_bytes() | https://www.openssl.org/docs/man1.0.2/man3/RAND_bytes.html |
| check the return values | http://jbp.io/2014/01/16/openssl-rand-api |
| Mining Your Ps and Qs | https://factorable.net/weakkeys12.extended.pdf |
| built-in PRNG | http://software.intel.com/en-us/articles/intel-digital-random-number-generator-drng-software-implementation-guide |
| LibreSSL | http://libressl.org |
| rand_s | https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/rand-s?view=vs-2019 |
| BCryptGenRandom | https://docs.microsoft.com/en-us/windows/desktop/api/bcrypt/nf-bcrypt-bcryptgenrandom |
| CryptGenRandom | http://msdn.microsoft.com/en-us/library/aa379942.aspx |
| RtlGenRandom | http://msdn.microsoft.com/en-us/library/windows/desktop/aa387694%28v=vs.85%29.aspx |
| https://github.com/veorq/cryptocoding#always-typecast-shifted-values |
| https://github.com/veorq/cryptocoding#problem-10 |
| demonstration implementation of SHA-1 in rfc3174 | https://tools.ietf.org/html/rfc3174 |
| https://github.com/veorq/cryptocoding#solution-10 |
| Readme | https://github.com/veorq/cryptocoding#readme-ov-file |
| Activity | https://github.com/veorq/cryptocoding/activity |
| 93 forks | https://github.com/veorq/cryptocoding/forks |
| Report repository | https://github.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Fveorq%2Fcryptocoding&report=veorq+%28user%29 |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |