CodeRigor

COURSE / REAL PRACTICE

Cryptography for application developers

Use standard Go primitives to distinguish byte encodings, checksums, authentication, authenticated encryption and password-storage requirements.

Lessons & exercises7 authored lessons3 units
Start with the first lesson.

Read the explanation and diagrams, then work through the practice. Your browser profile supplies your saved progress.

What you’ll work toward

Build and test a tamper-evident record signer/verifier with standard-library HMAC, explicit context/framing, canonical encodings and a working local CLI. Practise authenticated encryption with Go’s random-nonce AES-GCM API and distinguish password metadata policy from ordinary hashing.

Read an explanation, inspect the diagrams and work through the available checks, debugging exercises and builds. Feedback and prerequisite links guide the next step.

Before you start

This course builds on these skills:

Individual lessons can add prerequisites. Your lesson progress shows your actual readiness.

A look inside the first lesson

Choose the security goal before the primitive

Go
package main
import ("fmt";"encoding/base64")
func main(){
message:=[]byte("amount=10");encoded:=base64.StdEncoding.EncodeToString(message);decoded,_:=base64.StdEncoding.DecodeString(encoded);fmt.Println(string(decoded))
}

Your lesson sequence

Follow the same units and lessons in either view. Prerequisite links and your practice progress stay with each lesson.

UNIT 013 lessons Goals, bytes and ordinary hashes
  1. LESSON 01.01

    Choose the security goal before the primitive

    Separate reversible representation, unkeyed checksums, shared-key authentication and authenticated confidentiality.

    Open lesson
  2. LESSON 01.02

    Round-trip bytes through canonical hex and Base64

    Preserve arbitrary bytes, reject malformed or alternate spellings and keep encoding separate from security guarantees.

    Open lesson
  3. LESSON 01.03

    Use a checksum without mistaking it for authentication

    Calculate the complete SHA-256 digest and distinguish a trusted expected checksum from an attacker-supplied replacement.

    Open lesson
UNIT 023 lessons Authentication, encryption and password policy
  1. LESSON 02.01

    Authenticate exact bytes with HMAC

    Use HMAC-SHA-256 and hmac.Equal, verify published vectors and reject changed messages, wrong keys and truncated tags.

    Open lesson
  2. LESSON 02.02

    Use authenticated encryption with managed nonces

    Open AES-256-GCM records with Go’s random-nonce wrapper, bind associated data and return no plaintext when authentication fails.

    Open lesson
  3. LESSON 02.03

    Separate password-storage requirements from fast hashing

    Validate two explicit bounded metadata profiles while recognizing that metadata checks are neither a KDF nor password verification.

    Open lesson
UNIT 031 lesson Authenticated records
  1. LESSON 03.01

    Verify a framed authenticated record before using its payload

    Bind version/context to exact bounded bytes, enforce canonical fields and reject altered records before releasing payload data.

    Open lesson