# gtank/cryptopasta

copy & paste-friendly golang crypto

Repository: https://github.com/gtank/cryptopasta
Canonical: https://ross.abutalabs.com/products/cryptopasta
Homepage: https://speakerdeck.com/gtank/crypto-for-go-developers
Language: Go
License: CC0-1.0
License Family: permissive
Last push: 2019-02-12T08:09:10+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4005, "days_push": 2759, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1805, forks 97 (observed 2026-08-28T04:05:38.940748+00:00)

## What it is
A collection of copy-and-paste-friendly cryptography snippets for Go, wrapping the standard library's best practices for encryption (AES-GCM), hashing (HMAC-SHA512/256), and signing (ECDSA P-256). It is released under CC0 so developers can paste the code directly into their projects without attribution.

## Use cases
- encrypt data with AES-GCM in Go without making common mistakes
- hash and verify messages with HMAC in Go
- generate and marshal ECDSA signing keypairs in PEM format
- find safe default crypto parameters for a Go application
- avoid hand-rolling crypto when using Go's standard library

## When to choose
- you need simple, vetted crypto primitives in Go and want to paste reference code rather than add a dependency
- you want opinionated, mistake-proof defaults like authenticated encryption and constant-time P-256

## When to avoid
- you need a maintained library with ongoing updates and broad algorithm coverage - the repo has not seen a release since 2019
- you need protocols beyond basic encryption, hashing, and signing, such as TLS, key exchange, or password hashing
- you need a production dependency with semantic versioning rather than copy-pasted code

## Facets
- artifact type: library
- maturity: maintenance
- function: cryptography, security, developer-tools
- domain: security, developer-tools, programming-languages
- platform: go, cross-platform
- tags: copy-paste-crypto, aes-gcm, hmac, ecdsa, go-standard-library, reference-implementation

## Member repositories
- gtank/cryptopasta (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:38.940748+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:21:33.632821+00:00, confidence not recorded.
  - readme: https://github.com/gtank/cryptopasta (fetched 2026-08-28T04:05:38.940748+00:00, sha ad1587a59393)
  - homepage: https://speakerdeck.com/gtank/crypto-for-go-developers (fetched 2026-08-29T11:00:42.468593+00:00, sha 884bbd83e703)
  - site_page: https://speakerdeck.com/features (fetched 2026-08-29T11:00:42.472088+00:00, sha 060cbd756883)
  - site_page: https://speakerdeck.com/features/privacy-controls (fetched 2026-08-29T11:00:42.478951+00:00, sha 1837e0f5e668)
  - site_page: https://speakerdeck.com/features/password-protection (fetched 2026-08-29T11:00:42.480556+00:00, sha 37407c3061d9)
  - site_page: https://speakerdeck.com/features/custom-urls (fetched 2026-08-29T11:00:42.482175+00:00, sha daecaf9d5165)
  - site_page: https://speakerdeck.com/features/scheduled-publishing (fetched 2026-08-29T11:00:42.483918+00:00, sha 224f290775c5)
  - site_page: https://speakerdeck.com/student-pricing (fetched 2026-08-29T11:00:42.477061+00:00, sha cbee80985070)
- Data as of 2026-08-30T08:39:29.467469+00:00.
