Files
llm-wiki/raw/official-docs/crockford-base32-spec.md
T

95 lines
8.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "official-doc / Crockford's Base32 — Human-Friendly 32-Symbol Encoding Specification"
source_type: official-doc
url: https://www.crockford.com/base32.html
archive_url:
related_branches: [feature-resource-identifier-contract]
related_projects: [ca-skeleton]
tags: [official-doc, ca-skeleton, api-design, ulid, base32-encoding, resource-identifier]
created: 2026-05-31
---
# Crockford's Base32 — Human-Friendly 32-Symbol Encoding Specification
> Layer: `raw/` — 외부 자료(공식 문서)의 **원문 발췌·출처 기록**.
> 검증된 요약은 `/ingest` 후 `wiki/concepts/`에 `source-summary-template` 형식으로 별도 작성. 원본은 raw에 영구 보관.
## Parent / 활용 branch (필수, 최소 1개+)
| Branch | 이 자료가 정당화하는 결정 |
|---|---|
| [[raw/branch-notes/feature-resource-identifier-contract]] | D2 (charset / encoding) — Crockford base32 32자 심볼 셋 정의 + human-friendly 설계 근거 (I/L/O/U 제거 이유); D3 (case sensitivity) — 디코딩 시 대소문자 무관 + I/L/i/l/1 → 1, O/o → 0 정규화 규칙 근거 |
## 출처 / Source
- 원본 URL: https://www.crockford.com/base32.html
- 아카이브 URL: (미등록 — 향후 archive.org 스냅샷 추가 권장)
- 저자 / 조직: Douglas Crockford (개인 사양 — 개인이 관리하는 비공식 표준. IETF 표준 아님)
- 발행일: 2002-11-02 (페이지 하단 날짜 기준)
- 마지막 확인일: 2026-05-31
## 왜 저장했는지 / Why archived
ULID 는 내부적으로 Crockford base32 를 채택하여 26자 문자열을 생성한다. ca-skeleton 의 resource ID charset / encoding 결정(D2)과 case-sensitivity 정책(D3)의 근거로서, Crockford 가 직접 기술한 심볼 셋 정의·제외 이유·디코딩 정규화 규칙을 원문 그대로 보존한다. RFC 4648 base32 와의 차이(I/L/O/U 제거, 대소문자 정규화)를 증명하는 1차 출처.
## 핵심 인용 / Key quotes (verbatim, 5문장)
> [§Symbols] "We chose a symbol set of 10 digits and 22 letters. We exclude 4 of the 26 letters: I, L, O, U."
> — (line 25 in fetched text)
> [§Symbols — Excluded Letters] "I — Can be confused with 1" / "L — Can be confused with 1" / "O — Can be confused with 0" / "U — Accidental obscenity"
> — (lines 2831 in fetched text)
> [§Symbols] "When decoding, upper and lower case letters are accepted, and i and l will be treated as 1 and o will be treated as 0. When encoding, only upper case letters are used."
> — (line 33 in fetched text)
> [§Symbols] "Hyphens (-) can be inserted into symbol strings. This can partition a string into manageable pieces, improving readability by helping to prevent confusion. Hyphens are ignored during decoding. An application may look for hyphens to assure symbol string correctness."
> — (line 37 in fetched text)
> [§Base] "Base 32 seems the best balance between compactness and error resistance. Each symbol carries 5 bits."
> — (line 19 in fetched text)
## Claims Extracted / 추출된 주장
> 이 자료가 **직접 말하는 것만** claim 으로 분리한다. 내 프로젝트에 적용한 결론은 여기 쓰지 않는다.
| Claim ID | Claim (이 자료가 직접 말하는 것) | Evidence quote | Strength | Applies to | Does not prove |
|---|---|---|---|---|---|
| CROCKFORD-C1 | Crockford base32 심볼 셋은 10개 숫자 + 22개 알파벳 = 32자이며, 26자 알파벳 중 I / L / O / U 4자를 제외한다 | [§Symbols] "We chose a symbol set of 10 digits and 22 letters. We exclude 4 of the 26 letters: I, L, O, U." | `official-reference` | Crockford base32 를 채택한 모든 인코딩 구현 | RFC 4648 base32 또는 다른 base32 변형에는 적용 안 됨 |
| CROCKFORD-C2 | I 와 L 은 숫자 1과 혼동되고, O 는 숫자 0과 혼동되며, U 는 의도치 않은 외설 표현을 만들 수 있어 제외된다 | [§Symbols — Excluded Letters] "I — Can be confused with 1" / "L — Can be confused with 1" / "O — Can be confused with 0" / "U — Accidental obscenity" | `official-reference` | human-friendly 인코딩 심볼 선정 기준 | U 제외의 구체적인 외설 사례는 이 문서에서 나열하지 않음 |
| CROCKFORD-C3 | 디코딩 시 대소문자 모두 허용하며, i / l / I / L 은 1로, o / O 는 0으로 정규화된다. 인코딩 시에는 대문자만 사용한다 | [§Symbols] "When decoding, upper and lower case letters are accepted, and i and l will be treated as 1 and o will be treated as 0. When encoding, only upper case letters are used." | `official-reference` | Crockford base32 디코더 구현 | 입력 문자열에서 대문자로의 정규화 순서(전처리 vs 심볼 테이블) 는 명시 안 함 |
| CROCKFORD-C4 | 하이픈(-)은 심볼 문자열 안에 삽입 가능하며, 가독성을 위한 구분자로 사용된다. 디코딩 시 하이픈은 무시된다 | [§Symbols] "Hyphens (-) can be inserted into symbol strings. This can partition a string into manageable pieces, improving readability by helping to prevent confusion. Hyphens are ignored during decoding." | `official-reference` | Crockford base32 디코더 구현; 사람이 읽는 공개 ID 포맷 | 하이픈 위치나 개수에 대한 공식 권장 형식은 이 문서에서 정의하지 않음 |
| CROCKFORD-C5 | 체크 심볼은 선택적이며, 숫자를 37로 나눈 나머지(modulo 37)로 인코딩된다. 체크 심볼 전용으로 5개 추가 심볼이 있다 | [§Check] "The check symbol encodes the number modulo 37, 37 being the least prime number greater than 32. We introduce 5 additional symbols that are used only for encoding or decoding the check symbol." | `official-reference` | 오류 감지가 필요한 Crockford base32 구현 | ULID 는 체크 심볼을 사용하지 않음 — ULID-spec 별도 확인 필요 |
## Usage Boundaries / 적용 경계
- 이 자료가 직접 증명하는 것:
- `CROCKFORD-C1`: Crockford base32 의 32자 심볼 셋 구성 (09, AH, J, K, M, N, PT, VZ). RFC 4648 base32 와의 차이(I/L/O/U 부재)를 원저자 권위로 증명.
- `CROCKFORD-C2`: 4개 제외 문자 각각의 제외 이유. human-friendly 설계 의도의 원문 근거.
- `CROCKFORD-C3`: case-insensitive 디코딩 + I/L → 1, O → 0 정규화. D3 결정의 원문 근거.
- `CROCKFORD-C4`: 하이픈이 유효한 구분자이며 디코딩에서 무시됨. 사람이 읽는 ID 에 하이픈 허용의 근거.
- `CROCKFORD-C5`: 체크 심볼의 존재 및 modulo 37 알고리즘.
- 이 자료가 증명하지 않는 것:
- ULID 가 Crockford base32 를 사용한다는 사실 — ULID spec 별도 확인 필요 (`raw/official-docs/ulid-spec.md`, 미작성).
- Crockford base32 가 IETF 표준이라는 사실 — 이 문서는 개인(Douglas Crockford)이 작성한 사양이며 RFC 가 아님.
- ca-skeleton 의 resource ID 기본 형식이 ULID 이어야 한다는 결론 — 그것은 D1 결정으로, 이 문서는 D1 이 ULID 를 선택할 경우의 charset 근거만 제공.
- Crockford base32 가 URL-safe 하다는 사실 — 32자 심볼(09, AH, J, K, M, N, PT, VZ)이 RFC 3986 `unreserved` 에 속하는지는 RFC 3986 별도 확인 필요.
- 내 프로젝트에 적용하려면 추가 확인이 필요한 것:
- ULID spec 이 Crockford base32 를 어떻게 적용하는지 (monotonic encoding 등) — `raw/official-docs/ulid-spec.md` 작성 필요.
- case-insensitive 디코딩이 Spring / Hibernate / Jackson 직렬화 레이어에서 어떻게 처리되는지 — library 호환성 매트릭스(D16) 에서 확인.
- RFC 3986 `unreserved` charset 과 Crockford base32 32자의 교집합 — `raw/official-docs/rfc3986-uri-generic-syntax.md` (미작성) 에서 확인.
## 메모 / Notes
- 이 사양은 Douglas Crockford 개인 웹사이트(`crockford.com`)에 게시된 비공식 표준이다. IETF RFC 가 아니며, 표준 트랙 문서가 아님. 그러나 ULID, Hashids 등 여러 오픈소스 라이브러리가 이 사양을 채택하여 사실상 표준(de facto)으로 기능하고 있다.
- 페이지 하단 `0123456789ABCDEFGHJKMNPQRSTVWXYZ *~$=U 2002-11-02` 은 32자 기본 심볼 + 체크 심볼 전용 5개(`*~$=U`) + 발행일을 한 줄로 요약한 것으로 보인다.
- 추가로 봐야 할 동일 출처 페이지: `crockford.com` 에 다른 관련 사양 없음 (단일 페이지 문서).
## Related / 관련
- 같은 주제 다른 official-doc (미작성): [[raw/official-docs/ulid-spec.md]] — ULID 가 Crockford base32 를 적용하는 방식
- 같은 주제 다른 official-doc (미작성): [[raw/official-docs/rfc3986-uri-generic-syntax.md]] — URL-safe charset 검증 (D3 근거)
- 이 자료를 인용한 wiki 요약: `wiki/concepts/base32-encoding` (생성 시)