SSN Research · Cryptographic Systems

JAVANESE CIPHER
PROTOCOL

JCP — Sistem Kriptografi Berbasis Aksara Jawa dan Tembang Macapat
ꦲꦤꦕꦫꦏ ꧋ꦈꦈ ALGORITHMUS · CULTURA · SECURITAS
Seri Kriptografi Budaya · Sainskerta Solusi Nusantara

JAVANESE CIPHER PROTOCOL

JCP — A Cryptosystem Based on Aksara Jawa and Tembang Macapat

Preface

"Ana catur mungkur" — turn your back on idle talk.

A Javanese proverb on discretion. This book is about the difference between keeping a secret because no one is listening, and keeping a secret because no one can listen. Cryptography is only ever the second thing.

This book describes the Javanese Cipher Protocol (JCP), a cryptosystem that draws its structure from two artifacts of Javanese civilization: Aksara Jawa, the traditional Brahmic script of the Javanese language, and Tembang Macapat, a family of sung poetic meters defined by strict syllabic and tonal rules.

The book has an unusual obligation. Most cryptography texts describe systems that are believed secure and explain why. JCP is presented here partly as a design exercise and partly as a cautionary study. Some of its proposed mechanisms are cryptographically sound; others are examples of a seductive and recurring error — the belief that cultural inaccessibility is the same thing as cryptographic hardness. Rather than hide that tension, this book makes it the central theme.

We therefore do two things at once. First, we build the strongest honest version of JCP we can: one in which the Javanese layers serve as encodings, domain separators, and key-derivation personalization on top of standard, peer-reviewed primitives. Second, we dismantle the weak version: the romantic "the algorithm cannot be understood without the soul of Java" version, which fails the moment a competent adversary stops being charmed and starts counting symbols.

A reader who finishes this book should be able to (a) implement a usable variant of JCP, (b) explain precisely where its security actually comes from, and (c) recognize "security through cultural obscurity" wherever it appears in the wild, under whatever flag it happens to be flying.

The intended audience is practitioners and students with some exposure to classical and modern cryptography. No knowledge of Javanese is assumed; all necessary linguistic material is introduced as needed.

I
Part One

Foundations

1
Chapter 1

Introduction to Aksara Jawa

1.1 What Aksara Jawa Is

Aksara Jawa (also called Carakan, or Hanacaraka after its first five letters) is a Brahmic abugida: a writing system in which each base consonant carries an inherent vowel — by default the open vowel /a/ (realized as [ɔ] in many contexts) — which is then modified or suppressed by diacritics. It is a cousin of the scripts of South and Southeast Asia (Devanagari, Balinese, Sundanese, Batak), all descended from the Brahmi script and ultimately structured around the phonology of the languages they serve.

The script was, until the twentieth century, the standard medium for writing Javanese, used for everything from royal chronicles (babad), wayang lakon, and serat (treatises) to letters and account books. Romanization and, later, nationalization of the Latin alphabet displaced it from daily use, but it remains culturally central, taught in schools in Central and East Java and Yogyakarta, and carried by a substantial digital revival.

For cryptographic purposes, the important facts are these:

  1. The script is an abugida, not an alphabet. The unit of writing is the aksara (roughly, a consonant-plus-vowel syllable), not the phoneme. This matters because it changes what "a character" means when we count symbols and compute frequencies.
  2. The script has a modest base inventory but a large effective inventory once diacritics and conjuncts are combined.
  3. The script has a canonical ordering (the hanacaraka sequence) that is culturally fixed and therefore usable as a deterministic permutation.

1.2 The Carakan: Base Consonants

The twenty base letters (aksara nglegena / aksara wanda) in their traditional order form a pangram — a perfect sentence using each letter exactly once, attributed in legend to the myth of Aji Saka:

#AksaraLatinGloss fragment
1haHana caraka — "There were (two) messengers"
2na
3ca
4ra
5ka
6daData sawala — "who fell into dispute"
7ta
8sa
9wa
10la
11paPadha jayanya — "equal in their valor"
12dha
13ja
14ya
15nya
16maMaga bathanga — "both became corpses"
17ga
18ba
19tha
20nga

The legend is itself instructive for a cryptographer: the hanacaraka is a mnemonic carrying a tragic narrative of two loyal messengers who, each obeying contradictory instructions from their master, kill each other. The story is a lesson about the ambiguity of instructions in the absence of shared context — which is, not incidentally, the exact failure mode of a poorly specified protocol. We will return to this.

1.3 Sandhangan: The Diacritics

The inherent /a/ of each base letter is altered by sandhangan (diacritics). The principal ones:

Vowel-changing (sandhangan swara):

NameFunctionResulting vowel
Wulusuperscript curli
Sukusubscript hooku
Talingprescript marké / è
Taling-tarungbracketing markso
Pepetsuperscript ringê (schwa)

Final-consonant (sandhangan panyigeg wanda):

NameFunctionAdds
Layarsuperscriptfinal -r
Wignyanpostscriptfinal -h
Cecaksuperscript dotfinal -ng
Pangkon (paten)viramasuppresses inherent vowel

1.4 Pasangan: Conjunct Forms

Javanese, like other Brahmic scripts, dislikes writing a "naked" consonant with its inherent vowel suppressed in the middle of a word. Instead, when a syllable ends in a consonant that begins the next syllable's onset, the second consonant is written as a pasangan — a conjunct form, typically attached below or beside the first. Thus mangan ("to eat") and manga are written differently not by spelling out a pangkon but by the shape of the cluster.

Each of the twenty base letters has a pasangan form. From an information-theoretic standpoint, pasangan roughly double the glyph inventory (a letter in base position and the same letter in pasangan position are visually and codepoint-distinct), while carrying no additional linguistic information beyond positional context. This redundancy is a gift to a cryptanalyst and a problem for a naive cipher, as we discuss in Chapter 7.

1.5 Pada: Punctuation and Structural Marks

The script's punctuation (pada) includes pada lingsa (, comma-like), pada lungsi (, full stop), pada pangkat (), and ornate verse markers such as pada andhap, pada luhur, and purwapada / wasanapada that open and close poetic texts. In manuscripts these marks also encode metrical boundaries — which line of a tembang has ended — and thus they carry exactly the structural information that the JCP key schedule will exploit.

1.6 Unicode Encoding

Aksara Jawa was added to Unicode in version 5.2 (2009) in the block U+A980–U+A9DF (Javanese). The block contains 91 assigned code points, including:

Two encoding facts dominate the cryptographic discussion:

  1. Variable-length UTF-8. Every code point in the Javanese block lies in the range U+A980–U+A9DF, which UTF-8 encodes in three bytes each. A JCP ciphertext rendered as UTF-8 is therefore roughly three times the byte length of an equivalent ASCII text. This is a transport property, not a security property.
  2. Multiple code-point sequences can render identically. This means the mapping from glyph to byte sequence is not canonical unless we impose a normalization. An unspecified normalization is a latent correctness and security bug (§9.1).

We adopt the rule: all JCP plaintext and key material is normalized to Unicode NFC and then to a canonical aksara ordering before any cryptographic operation.

1.7 Why a Script Is Not a Cipher

It must be said plainly at the outset: writing a message in Aksara Jawa is not encryption. It is transliteration — a public, reversible, well-documented re-encoding. Anyone with a Unicode table inverts it in linear time. A script is a code in the old telegraphic sense (a fixed symbol substitution), and a code with a published codebook offers zero confidentiality.

This is the first and most important honest statement in the book. Everything that follows is an attempt to find what, if anything, beyond transliteration the Javanese tradition can contribute to a real cryptosystem. The answer is: quite a lot as engineering ergonomics and key structure, and almost nothing as a substitute for a cipher.

꧇꧒
2
Chapter 2

Tembang Macapat as Mathematical Structure

2.1 What Macapat Is

Tembang macapat is a genre of traditional Javanese sung poetry. Each poem is composed in one of eleven named meters (metrum), and each meter is defined by three numerical/phonological constraints:

A meter is thus a fixed template: a sequence of (syllable-count, final-vowel) pairs, one per line. A poet composing in that meter must hit every count exactly and end every line on the prescribed vowel. The constraints are strict; a line with the wrong syllable count or wrong final vowel is simply wrong, not merely inelegant.

2.2 The Eleven Meters

We write each meter as a sequence of N⟨vowel⟩ tokens, where N is the guru wilangan and ⟨vowel⟩ the guru lagu of that line.

MeterGuru gatraPattern (guru wilangan + guru lagu)
Maskumambang412i · 6a · 8i · 8a
Mijil610i · 6o · 10e · 10i · 6i · 6u
Sinom98a · 8i · 8a · 8i · 7i · 8u · 7a · 8i · 12a
Kinanthi68u · 8i · 8a · 8i · 8a · 8i
Asmarandana78i · 8a · 8e · 8a · 7a · 8u · 8a
Gambuh57u · 10u · 12i · 8u · 8o
Dhandhanggula1010i · 10a · 8e · 7u · 9i · 7a · 6u · 8a · 12i · 7a
Durma712a · 7i · 6a · 7a · 8i · 5a · 7i
Pangkur78a · 11i · 8u · 7a · 12u · 8a · 8i
Megatruh512u · 8i · 8u · 8i · 8o
Pucung412u · 6a · 8i · 12a

2.3 The Meters as Integer Sequences

Strip the vowels and a meter is an integer sequence — its syllable signature:

Maskumambang : (12, 6, 8, 8)
Mijil        : (10, 6, 10, 10, 6, 6)
Sinom        : (8, 8, 8, 8, 7, 8, 7, 8, 12)
Kinanthi     : (8, 8, 8, 8, 8, 8)
Asmarandana  : (8, 8, 8, 8, 7, 8, 8)
Gambuh       : (7, 10, 12, 8, 8)
Dhandhanggula: (10, 10, 8, 7, 9, 7, 6, 8, 12, 7)
Durma        : (12, 7, 6, 7, 8, 5, 7)
Pangkur      : (8, 11, 8, 7, 12, 8, 8)
Megatruh     : (12, 8, 8, 8, 8)
Pucung       : (12, 6, 8, 12)

2.4 Combinatorial Properties

It is tempting — and many enthusiast write-ups do exactly this — to claim a huge key space by multiplying combinatorial possibilities of the script and meters. We will do the multiplication honestly, and then explain why most of the product is illusory.

(a) Meter selection. Choosing one of the eleven meters contributes log₂ 11 ≈ 3.459 bits. That is, less than a single ASCII character. Meter choice alone is cryptographically negligible.

(b) Symbol-space size of the script. Suppose we bound a written aksara cluster as: one of 20 base consonants, optionally one of ~7 vowel sandhangan (or the inherent vowel), optionally one of ~3 final-consonant sandhangan, optionally one medial. A crude upper bound on legal clusters is:

20 × (7+1) × (3+1) × (2+1) ≈ 20 × 8 × 4 × 3 = 1920

distinct clusters, of which a smaller subset (perhaps 400–700) actually occur with non-negligible frequency in real Javanese text. So the effective alphabet of written Javanese is on the order of a few hundred symbols — larger than Latin (~26–52), but this enlargement by itself buys only:

log₂ 700 ≈ 9.45 bits per symbol

of maximum per-symbol entropy, and natural-language redundancy collapses the realized entropy to roughly 1–1.5 bits per symbol (Shannon's estimate for English is ~1.0–1.3 bits/letter; Javanese is not magically different).

2.5 A Worked Entropy Discount

Let a key be a freshly composed Kinanthi stanza: 6 lines, guru wilangan all 8, so 48 syllables. Pattern 8u · 8i · 8a · 8i · 8a · 8i.

Conclusion: a hand-composed macapat stanza, treated as a passphrase, plausibly carries 40–96 bits of entropy — comparable to a decent (not excellent) human passphrase, and well short of a 128-bit key. This is not a reason to abandon macapat; it is a reason to stretch it with a memory-hard KDF (§4.2) rather than to use it raw.

꧇꧓
3
Chapter 3

Javanese Philosophy of Language

3.1 Why a Cryptography Book Has a Philosophy Chapter

JCP's proponents make a strong claim: that cultural context — the web of meaning, allusion, and interpretation surrounding a Javanese text — constitutes cryptographic key material that machines cannot access. To evaluate that claim rather than merely assert or dismiss it, we must first describe the philosophy of language it rests on, accurately and sympathetically. We do that here. We then test it, unsympathetically, in Part IV. Sympathy first, then arithmetic.

3.2 Rasa: Meaning Below the Words

Central to Javanese aesthetics and kebatinan (inward, mystical practice) is rasa — a term spanning "feeling," "taste," "intuition," and "inner meaning." A text is held to have an outer sense (the literal words) and an inner sense (its rasa), and to read truly is to apprehend the latter. Macapat, sung rather than merely read, is a rasa-bearing form: the meter's emotional convention (Asmarandana = longing) frames how its words are felt.

For a cryptographer, the relevant question is operational: is rasa a function the sender and receiver compute identically, that an attacker cannot? If yes, it is a shared secret and could in principle key a cipher. If no — if rasa is interpretive, varying between competent readers — then it cannot be a key, because a key must be exactly reproducible by the legitimate parties and by no one else. We flag the question now and answer it in §11.2.

3.3 Konteks: The Contextual Determination of Meaning

Javanese discourse is famously context-sensitive. The language has elaborate speech levels (ngoko, madya, krama, krama inggil) selecting word forms by social relation. Much is communicated by sasmita (hint, allusion) and pasemon (veiled reference) rather than statement.

We treat this seriously in Chapter 10 — and show that it reduces, formally, to a low-entropy shared secret: useful as one factor, fatal as the whole scheme.

3.4 Semiotics: Syntactic vs Semantic Layers

We can frame the whole tension semiotically. Any sign system has:

JCP's bold proposal is to recruit the pragmatic layer — context, intent, cultural competence — as a security resource.

The thesis of this book, argued in full in Part IV:

The pragmatic layer can supply usability (mnemonic keys, plausible deniability, social key-distribution) and a modest, enumerable amount of entropy. It cannot supply confidentiality guarantees, because security guarantees are syntactic claims — statements about what an adversary cannot compute — and pragmatic meaning, by its nature, is neither uniformly distributed, secret from a determined ethnographer, nor exactly reproducible. Build on the syntactic rock; decorate with the pragmatic; never live in the decoration.
꧇꧑꧑
II
Part Two

The JCP Protocol

꧇꧔
4
Chapter 4

Core Algorithm Specification

4.0 Two Constructions, Stated Honestly

We specify JCP in two layers, and we are explicit about which is which:

A reader who only remembers one sentence should remember this: JCP-Hardened is secure because of Argon2id and ChaCha20, not because of Java. JCP-Classical is insecure, and no amount of cultural depth fixes that.

4.1 Character Mapping: Latin → Aksara → Unicode

The encoding pipeline is a public, bijective transliteration. It is not part of the secret; per Kerckhoffs it is fully published.

  1. Romanization normalization. Input text is reduced to a canonical Javanese romanization (the Sriwedari/EYD-style scheme): lower-cased, with digraphs dh, th, ny, ng recognized as single phonemes.
  2. Syllabification. The romanized stream is segmented into wanda (orthographic syllables).
  3. Aksara assembly. Each syllable maps to an aksara cluster: base consonant + sandhangan.
  4. Unicode emission and normalization. The cluster is emitted as a code point sequence in canonical order, then NFC-normalized.

The translocation is defined formally:

TRANSLIT  : LatinText  → AksaraCodepoints   (public, total, invertible)
TRANSLIT⁻¹: AksaraCodepoints → LatinText
∀ m : TRANSLIT⁻¹(TRANSLIT(m)) = normalize(m)

4.2 Tembang-Based Key Derivation Function (KDF)

The KDF turns a human-chosen macapat verse (plus optional context factors) into a uniform 256-bit key.

Inputs:

Procedure (JCP-Hardened KDF):

function JCP_KDF(V, M, σ, C, S):
    assert scans(V, σ)                      # meter check
    pers = "JCP/v1|" + M + "|" + encode(σ)  # personalization
    pre  = HKDF_Extract(salt = S,
                        ikm  = NFC(V) || 0x00 || NFC(C))
    seed = HKDF_Expand(pre, info = pers, L = 32)
    key  = Argon2id(password = seed,
                    salt     = S || pers,
                    m = 256 MiB, t = 4, p = 2,
                    outlen   = 32)
    return key                              # 256-bit symmetric key

4.3 Encryption Round Structure

JCP-Classical (insecure, pedagogical). Let the secret verse have syllable signature g = (g₁, g₂, …, g_L). Index the aksara alphabet 0 … A-1 in the canonical hanacaraka order. To encrypt aksara stream p₀ p₁ p₂ …:

for i in 0,1,2,…:
    shift_i = g[i mod L]                 # repeating metrical key
    c_i     = (p_i + shift_i) mod A      # additive shift in the aksara ring

This is a polyalphabetic substitution cipher — a Vigenère cipher whose key is the integer sequence g.

JCP-Hardened (recommended).

function JCP_Encrypt(plaintext, key, M, σ):
    A   = NFC(TRANSLIT(plaintext))
    N   = random 96-bit nonce
    AD  = "JCP/v1|" + M + "|" + encode(σ)
    ct, tag = ChaCha20Poly1305_Encrypt(
                  key = key, nonce = N,
                  plaintext = A, aad = AD)
    return Frame{ version=1, M, S, N, ct, tag }

4.4 Decryption Process

function JCP_Decrypt(frame, V, C):
    σ   = signature_of(frame.M)
    key = JCP_KDF(V, frame.M, σ, C, frame.S)
    A   = ChaCha20Poly1305_Decrypt(
              key = key, nonce = frame.N,
              ciphertext = frame.ct, tag = frame.tag,
              aad = "JCP/v1|" + frame.M + "|" + encode(σ))
    if A == ⊥: abort("authentication failed")
    return TRANSLIT⁻¹(A)

4.5 Padding and Mode of Operation

JCP-Hardened operates as a stream AEAD (ChaCha20-Poly1305), needing no block padding. The unit of encryption is one frame per message. JCP therefore mandates one of: (a) random 96-bit nonces with a strict message-count limit, (b) an XChaCha20 variant with 192-bit nonces, or (c) a deterministic counter. We recommend XChaCha20-Poly1305 for JCP.

꧇꧕
5
Chapter 5

Key Generation and Management

5.1 Tembang Selection as Key Seed

The user-facing secret in JCP is a macapat verse, chosen in one of three ways, in decreasing order of security:

  1. Composed-fresh (recommended). The user composes an original stanza that scans correctly in a chosen meter.
  2. Composed-from-diceware. The user maps random words from a large Javanese wordlist into a scanning stanza.
  3. Canonical verse (discouraged). Using a known verse from a published serat. Entropy ≈ 15–17 bits.

5.2 Key Space Analysis

Key methodRaw entropy HAfter Argon2id
Canonical verse15–17 bitsbroken in minutes
Hand-composed stanza40–96 bitsweak-to-moderate
Diceware-into-meter, 6 words~77 bitsstrong vs. casual attackers
Diceware-into-meter, 10 words~129 bitseffectively unbrute-forceable

The single most important equation in this book:

Security ≈ H_verse + log₂(KDF cost per guess) − log₂(attacker parallelism)

Notice that nothing in this equation is Javanese.

5.3 Cultural Context as Additional Key Material

We fold context C into the salt/IKM as defense in depth worth perhaps 10–25 bits against a non-targeted attacker. The design rule: the security argument must survive the full disclosure of C.

꧇꧖
6
Chapter 6

Implementation Examples

6.1 Full Walkthrough with Sample Plaintext

Plaintext (Latin): aja dumeh — "do not be arrogant."

Secret verse V (Kinanthi, 6×8, composed-from-diceware):

Line 1 (8u): wêlut sêga gunung samun
Line 2 (8i): lawang wêngi tanpa tulis
Line 3 (8a): grimis tiba ing pawana
Line 4 (8i): sêpi sonya datan kèksi
Line 5 (8a): watu item ngumpul ana
Line 6 (8i): nglari dalan kang sêjati

Step A — meter check. scans(V, σ_Kinanthi) passes: counts all 8, finals match u i a i a i.

Step B — KDF. With random salt S, compute Argon2id → 256-bit key.

Step C — transliterate plaintext. aja dumeh → syllables a · ja · du · meh → aksara ꦲꦗꦢꦸꦩꦺꦃ (ha-ja, da+suku, ma+taling+wignyan).

Step D — AEAD. Random nonce N (192-bit, XChaCha20). Encrypt the aksara bytes.

Step E — frame. Emit Frame{v=1, M=Kinanthi, S, N, ct, tag}.

6.2 Code Examples

def transliterate(latin: str) -> bytes:
    rom = canonical_romanize(latin)
    wandas = syllabify(rom)
    cps = []
    for w in wandas:
        base, medial, vowel, final = parse_syllable(w)
        cps += assemble_aksara(base, medial, vowel, final)
    return nfc(encode_codepoints(cps))

def jcp_kdf(verse: str, meter: str, context: str, salt: bytes) -> bytes:
    sig = signature_of(meter)
    assert scans(verse, sig)
    pers = b"JCP/v1|" + meter.encode() + b"|" + encode_sig(sig)
    ikm  = nfc(verse.encode()) + b"\x00" + nfc(context.encode())
    seed = hkdf(salt=salt, ikm=ikm, info=pers, length=32)
    return argon2id(password=seed, salt=salt + pers,
                    mem=256*1024, iters=4, lanes=2, hashlen=32)

def jcp_encrypt(plaintext, verse, meter, context):
    salt = random_bytes(16)
    key  = jcp_kdf(verse, meter, context, salt)
    nonce = random_bytes(24)
    aad  = b"JCP/v1|" + meter.encode() + b"|" + encode_sig(signature_of(meter))
    ct, tag = xchacha20poly1305_encrypt(key, nonce, transliterate(plaintext), aad)
    return frame(version=1, meter=meter, salt=salt, nonce=nonce, ct=ct, tag=tag)

def jcp_decrypt(fr, verse, context):
    key = jcp_kdf(verse, fr.meter, context, fr.salt)
    aad = b"JCP/v1|" + fr.meter.encode() + b"|" + encode_sig(signature_of(fr.meter))
    pt  = xchacha20poly1305_decrypt(key, fr.nonce, fr.ct, fr.tag, aad)
    if pt is AUTH_FAIL:
        raise ValueError("authentication failed")
    return untransliterate(pt)

And, for contrast, the entire JCP-Classical cipher:

def jcp_classical_encrypt(aksara_indices, guru_wilangan):
    A = ALPHABET_SIZE
    g = guru_wilangan
    return [(p + g[i % len(g)]) % A for i, p in enumerate(aksara_indices)]

6.3 Test Vectors

Vector C-1 (JCP-Classical, hand-verifiable). Use a 5-symbol toy alphabet for clarity: index ha=0, na=1, ca=2, ra=3, ka=4. Meter = Pucung-toy with g = (12, 6, 8, 12) mod 5 = (2, 1, 3, 2).

plaintext indices : ha na ca ra ka  ha na ca ra ka   = 0 1 2 3 4 0 1 2 3 4
shift   g[i mod 4] : 2 1 3 2 2 1 3 2 2 1
cipher (p+g) mod 5 : 2 2 0 0 1 1 4 4 0 0
cipher symbols     : ca ca ha ha na  na ka ka ha ha

Vector H-1 (JCP-Hardened, parameter-complete):

meter      : Kinanthi
signature  : counts (8,8,8,8,8,8), vowels (u,i,a,i,a,i)
verse V    : (the six Kinanthi lines above, exact UTF-8, NFC)
context C  : ""
salt S     : 0x00112233445566778899AABBCCDDEEFF
KDF        : HKDF-SHA256 → Argon2id(m=262144 KiB, t=4, p=2, outlen=32)
nonce N    : 0x000102030405060708090A0B0C0D0E0F1011121314151617
plaintext  : "aja dumeh"
aksara(pt) : ꦲꦗꦢꦸꦩꦺꦃ (NFC, canonical order)
AAD        : "JCP/v1|Kinanthi|8u8i8a8i8a8i"
꧇꧑꧑꧑
III
Part Three

Security Analysis

The previous part built JCP charitably. This part attacks it honestly. A design that has not been attacked has not been evaluated; it has merely been admired.

꧇꧗
7
Chapter 7

Cryptographic Strength

We analyze both constructions against the standard attack catalogue. Throughout, we apply Kerckhoffs's principle: the adversary knows the full algorithm. The only secret is the key.

7.1 Brute-Force Resistance

JCP-Hardened. Brute force targets the verse V. Against a diceware-into-meter key of ~77 bits stretched by Argon2id(256 MiB, t=4), the per-guess cost is on the order of 10⁸–10⁹ hash-equivalents and 256 MiB of memory bandwidth, defeating GPU/ASIC economics. Against a lazy 40-bit hand-composed verse, brute force succeeds in hours.

JCP-Classical. The naive key space is A^L ≈ 700^6 ≈ 2^57, which sounds large and is completely irrelevant, because you never brute-force a Vigenère cipher — you solve it analytically in time roughly linear in the ciphertext.

7.2 Frequency-Analysis Resistance

Breaking JCP-Classical step by step:

  1. Find the period L via Kasiski examination or index of coincidence. Because there are only 11 meters, the attacker tries eleven periods.
  2. Split into L columns. Each column was enciphered by a single shift g_j — a Caesar cipher.
  3. Solve each column by frequency matching against the known Javanese aksara histogram.
  4. Confirm with guru lagu. The recovered shifts must make every line end in its meter's prescribed vowel.

Total cost: parse a few hundred aksara, try ≤ 11 periods, solve ≤ 10 Caesar columns. Seconds on a laptop, with no knowledge of Javanese language or culture.

7.3 Known-Plaintext Attack (KPA)

JCP-Classical. Devastating. A single known (plaintext, ciphertext) pair longer than one period reveals g immediately by subtraction.

JCP-Hardened. Secure: ChaCha20-Poly1305 is IND-CCA2 / AE-secure.

7.4 Chosen-Plaintext Attack (CPA)

JCP-Classical. The attacker chooses a plaintext (all ha = 0 repeated), and the ciphertext is the key sequence g.

JCP-Hardened. IND-CPA secure by the standard ChaCha20-Poly1305 reduction.

Summary Table

AttackJCP-ClassicalJCP-Hardened
Ciphertext-only / frequencybroken in secondsresistant (ChaCha20 PRF)
Brute forceirrelevant; analytic break winsbounded by verse entropy + Argon2id
Known-plaintexttotal key recovery from 1 pairAE-secure
Chosen-plaintextkey read off in 1 queryIND-CPA secure
Integrity / forgerynone; fully malleablePoly1305, EUF-CMA
Nonce-reuse failuren/acatastrophic (mandatory discipline)
꧇꧘
8
Chapter 8

Comparison with Classical and Modern Ciphers

8.1 vs Vigenère

JCP-Classical is a Vigenère cipher. Precisely: it is a polyalphabetic additive substitution over an aksara alphabet with key = the guru-wilangan integer sequence and period = the guru gatra. Every property transfers.

8.2 vs Enigma

JCP-Classical is weaker than Enigma; JCP-Hardened is far stronger than Enigma but, like Enigma, only as strong as the discipline of the humans using it.

The real lesson from Enigma: it fell not (only) to brute force but to protocol and usage flaws — predictable message preambles, operator habits, reused settings. Strong primitives do not survive weak operations.

8.3 vs Modern Ciphers (AES, ChaCha20)

There is no contest, and pretending otherwise is the genre's cardinal sin.

This is the honest placement of JCP: as a cipher, it is either Vigenère (Classical) or ChaCha20 (Hardened). Its novelty lives in encoding, key ergonomics, and the cultural/steganographic envelope — and those are real contributions, just not cryptographic-strength ones.

꧇꧙
9
Chapter 9

Limitations and Weaknesses

9.1 Unicode Normalization Issues

This is JCP's most underrated technical hazard. An aksara cluster can, depending on input method and platform, be produced in different code-point orders. Two users who "type the same verse" can produce different byte strings. The consequence for the KDF is exquisitely sensitive: a one-byte difference in NFC(V) yields a completely different key.

Mitigation (mandatory): define one canonical pipeline — romanize → syllabify → assemble in fixed order → NFC → and key on that. Ship the normalization as a pinned, tested component.

9.2 Key-Distribution Challenges

JCP shares the symmetric-key bootstrap problem. Two parties must share V (and C) secretly before communicating. The cultural twist:

9.3 Performance Considerations

꧇꧗꧙
IV
Part Four

Cultural Security Model

Aja nganti kabanjur-pambukaning panganggep — "Let not the opening of your understanding be misled."

Javanese counsel on the danger of first impressions.

Part IV undertakes a different kind of evaluation. We examine the claim that cultural context itself constitutes a security resource that no purely mathematical algorithm can replicate. This claim is the heart of what proponents call "cultural cryptography."

We conclude, with reasons, that the cultural layer provides usability and social plausibility but cannot provide cryptographic guarantees.

꧇꧑꧐
10
Chapter 10

The Mythos Layer

10.1 The Claim

The strongest version of the cultural-security argument: Javanese oral tradition, kebatinan philosophy, and the semantic context of macapat create an "information layer" that no algorithm can penetrate, because algorithms operate on syntax while Javanese text operates on semantics and pragmatics.

This is an intellectually serious claim. It deserves a response that honors its depth before testing its limits.

10.2 Kebatinan and Inner Meaning

Kebatinan (from batin, "inner," "spiritual") is a Javanese philosophical tradition emphasizing direct, intuitive apprehension of reality. Texts, especially macapat, are vehicles for rasa — a term spanning "taste," "feeling," "intuition," and inner knowing.

For the cryptographer: can rasa serve as a shared secret? The honest answer is no, for two reasons:

First: rasa is not deterministic. Two competent Javanese readers may experience different rasa from the same verse. A cryptographic key must be exactly reproducible.

Second: rasa is not sampleable from a uniform distribution. The space of possible rasa experiences is not enumerable in any useful sense.

10.3 Syntactic Understanding vs. Semantic Understanding

An attacker does not need to understand the poem in the human sense. They only need to reproduce the bits that key the cipher.

This is the central asymmetry that cultural cryptography ignores: an attacker can win without understanding.

DimensionHuman readerLanguage modelCryptographic significance
Syntaxcan parsecan parselow
Semanticsunderstandsapproximateslow (reproduction matters)
Pragmaticsgrasps contextlimitedlow
Rasafeelscannotnil (not needed for key recovery)

10.4 The Difference Between "Hard for AI" and "Hard for Adversary"

Cultural depth enriches the aesthetic difficulty of composing a verse while leaving the computational difficulty of enumerating one entirely untouched. This is the error the Mythos Layer makes: it mistakes aesthetic difficulty for computational difficulty. They are different things.

10.5 What the Mythos Layer Actually Protects

  1. Plausible deniability. A ciphertext that renders as a valid macapat stanza can plausibly be "just a poem."
  2. Memorability. A human can recall a composed verse far more reliably than a random 80-bit string.
  3. Social key distribution. A verse can be transmitted socially without triggering suspicion.

All three are real and valuable. None of them are confidentiality guarantees.

꧇꧑꧑
11
Chapter 11

Security Through Cultural Obscurity (STCO)

11.1 What STCO Is

Security Through Cultural Obscurity is a specific variant of the general Security Through Obscurity (STO) fallacy. The JCP version: "Even if you know how Aksara Jawa works, you cannot truly understand the cipher unless you have grown up with macapat, understand kebatinan, and speak Javanese natively."

11.2 What STCO Actually Protects

11.3 What STCO Does NOT Protect

11.4 The Fable & Mythos Problem

Kerckhoffs's principle: a cryptosystem should be secure even if the attacker knows every detail of the algorithm except the key. The cultural proponent's response is the Fable & Mythos argument: that the "true" algorithm includes a layer — rasa, konteks, kebatinan — that is not written down and cannot be learned from outside.

The argument fails for a precise reason: the Fable & Mythos layer is neither required for implementation nor needed for attack.

Cultural cryptography mistakes the story a culture tells about its own writing for the mechanics of symbol processing. The story is beautiful, meaningful, and important. The mechanics are just arithmetic — and arithmetic has no culture.

11.5 When Cultural Obscurity Helps

ScenarioSTCO helpful?Why
Nation-state SIGINTNoThey fund a Javanese linguist as marginal cost
Censorship circumvention (casual filter)YesScript-unaware filter passes aksara
Covert messaging in repressive stateConditionallyIf combined with plausible deniability
Personal privacy vs. bulk scanningYesBulk scanning looks for Latin keywords
Academic demonstrationYesPedagogical scaffold

11.6 The Fable Layer as Plausible Deniability

A ciphertext that looks like a meaningful poem is harder to detect as ciphertext, and the user can plausibly claim it is just a poem. This is a deniability argument, not a confidentiality argument. They must not be conflated.

11.7 The Limits of Cultural Key Material

An operational rule for evaluating any cultural cryptography proposal — test it against four questions:

  1. Reproducibility. Can two honest parties derive exactly the same key from the same input?
  2. Enumerability. Is the secret drawn from a distribution the attacker can enumerate?
  3. Independence. Is the security argument robust against the attacker also being a native speaker?
  4. Accounting. Is every bit of entropy quantified from a specific, countable source?

JCP-Classical passes none. JCP-Hardened passes all four only because its security ultimately depends on standard primitives.

A
Appendix A

Complete Aksara Jawa Unicode Table

This appendix provides a complete reference mapping of the Javanese Unicode block (U+A980–U+A9DF), organized by functional category. All codepoints are given in hex. NFC normalization is used throughout.

A.1 Aksara Nglegena (Base Consonants)

The twenty core aksara in the traditional hanacaraka order:

#AksaraUnicodeLatinGloss
1U+A9B2haHana
2U+A9A4nacaraka
3U+A995ca
4U+A9ABra
5U+A98Fka
6U+A9A2daData
7U+A9A0tasawala
8U+A9B1sa
9U+A9AEwa
10U+A9ADla
11U+A9A5paPadha
12U+A99Ddhajayanya
13U+A997ja
14U+A9AAya
15U+A99Anya
16U+A9A9maMaga
17U+A992gabathanga
18U+A9A7ba
19U+A99Btha
20U+A994nga

A.2 Sandhangan (Diacritics)

A.2.1 Sandhangan Swara (Vowel-Changing):

GlyphUnicodeNameFunctionResult
U+A9B6WULUsuperscript curl/i/
U+A9B8SUKUsubscript hook/u/
U+A9BATALINGprescript/é, è/
U+A9B4TARUNGpostscript circlepart of -o
U+A9BCPEPETsuperscript ring/ê/ (schwa)

A.2.2 Sandhangan Panyigeg Wanda (Final-Consonant):

GlyphUnicodeNameAdds
U+A981LAYARfinal -r
U+A983WIGNYANfinal -h
U+A982CECAKfinal -ng
U+A9C0PANGKONvirama

A.3 Aksara Murda (Honorific Forms)

LatinAksaraUnicodeSource
KaU+A991ka ꦏ
NaU+A99Fna ꦤ
PaU+A9A6pa ꦥ
BaU+A9A8ba ꦧ
SaU+A9AFsa ꦱ
RaU+A9ACRA AGUNG

A.4 Punctuation and Digits

GlyphUnicodeNameFunction
U+A9C8PADA LINGSAcomma
U+A9C9PADA LUNGSIfull stop
U+A9C7PADA PANGKATcolon / number marker
U+A9CAPADA ADEGopening text marker
U+A9D0DIGIT ZERO0
U+A9D1DIGIT ONE1
U+A9D2DIGIT TWO2
U+A9D3DIGIT THREE3
U+A9D4DIGIT FOUR4
U+A9D5DIGIT FIVE5
U+A9D6DIGIT SIX6
U+A9D7DIGIT SEVEN7
U+A9D8DIGIT EIGHT8
U+A9D9DIGIT NINE9
꧇꧑꧑꧇
B
Appendix B

Tembang Macapat Reference

B.1 Complete Meter Table

#MeterGatraWilangan (count vector)Lagu (vowel vector)Rasa
1Maskumambang4(12, 6, 8, 8)(i, a, i, a)Grief, longing
2Mijil6(10, 6, 10, 10, 6, 6)(i, o, e, i, i, u)Birth, emergence
3Sinom9(8, 8, 8, 8, 7, 8, 7, 8, 12)(a, i, a, i, i, u, a, i, a)Youth, beauty
4Kinanthi6(8, 8, 8, 8, 8, 8)(u, i, a, i, a, i)Guidance, love
5Asmarandana7(8, 8, 8, 8, 7, 8, 8)(i, a, e, a, a, u, a)Romantic love
6Gambuh5(7, 10, 12, 8, 8)(u, u, i, u, o)Friendship
7Dhandhanggula10(10, 10, 8, 7, 9, 7, 6, 8, 12, 7)(i, a, e, u, i, a, u, a, i, a)Wisdom
8Durma7(12, 7, 6, 7, 8, 5, 7)(a, i, a, a, i, a, i)Anger, battle
9Pangkur7(8, 11, 8, 7, 12, 8, 8)(a, i, u, a, u, a, i)Resolve
10Megatruh5(12, 8, 8, 8, 8)(u, i, u, i, o)Death, parting
11Pucung4(12, 6, 8, 12)(u, a, i, a)Irony, humor

B.2 Structural Analysis

Syllable Count Distribution:

MeterTotal syllablesLines
Dhandhanggula8410
Sinom749
Pangkur627
Asmarandana557
Durma527
Mijil486
Kinanthi486
Gambuh455
Megatruh445
Pucung384
Maskumambang344

B.3 Rasa and Narrative Sequence

OrderMeterStage of Life
1MijilBirth, emergence
2KinanthiChildhood, guidance
3SinomYouth, courtship
4AsmarandanaLove, heartbreak
5GambuhCompanionship
6DhandhanggulaWisdom, maturity
7PangkurResolve, virtue
8DurmaBattle, struggle
9MaskumambangGrief, loss
10MegatruhDeath, parting
11PucungReflection
꧇꧑꧑꧇
C
Appendix C

Test Vectors

This appendix provides verifiable test vectors for JCP-Classical (hand-verifiable) and the complete input parameters for JCP-Hardened.

C.1 Vector C-1: JCP-Classical (Hand-Verifiable)

Setup. Toy alphabet: first five aksara. A = 5. Meter: Pucung-toy, g = (2, 1, 3, 2).

Plaintext indices  : ha na ca ra ka  ha na ca ra ka
                    = 0  1  2  3  4  0  1  2  3  4
Shift g[i mod 4]   : 2  1  3  2  2  1  3  2  2  1
Add (mod 5)        : 2  2  0  0  1  1  4  4  0  0
Cipher symbols     : ca ca ha ha na  na ka ka ha ha

Decryption: p_i = (c_i − g[i mod L]) mod A returns original. ✓

C.2 Vector H-1: JCP-Hardened (Parameter-Complete)

meter      : Kinanthi
signature  : counts (8,8,8,8,8,8), vowels (u,i,a,i,a,i)
verse V    : wêlut sêga gunung samun / lawang wêngi tanpa tulis /
             grimis tiba ing pawana / sêpi sonya datan kèksi /
             watu item ngumpul ana / nglari dalan kang sêjati
context C  : ""
salt S     : 0x00112233445566778899AABBCCDDEEFF
KDF        : HKDF-SHA256 → Argon2id(m=262144 KiB, t=4, p=2, outlen=32)
nonce N    : 0x000102030405060708090A0B0C0D0E0F1011121314151617
plaintext  : "aja dumeh"
aksara(pt) : ꦲꦗꦢꦸꦩꦺꦃ (NFC canonical)
AAD        : "JCP/v1|Kinanthi|8u8i8a8i8a8i"

C.3 Vector H-2: With Context

Identical to H-1 except context C = "sêpi ing pamrih". Key(H2) should be completely unrelated to key(H1) even though V, M, S are identical.

C.4 Vector C-2: JCP-Classical Full Aksara

Setup: Full 20-letter nglegena alphabet. Meter = Kinanthi, g = (8,8,8,8,8,8).

Plaintext trans  : ha na ca ra ka da  ta sa wa la pa dha
Indices          : 0  1  2  3  4  5  6  7  8  9  10 11
Shift (8 mod 20) : 8  8  8  8  8  8  8  8  8  8  8  8
Add (mod 20)     : 8  9  10 11 12 13 14 15 16 17 18 19
Cipher indices   : wa la pa dha ja nya ma ga ba tha nga

Because Kinanthi's guru wilangan is uniformly 8, this reduces to a monoalphabetic Caesar cipher.

Epilogue

Postface

"Ana catur mungkur" — turn your back on idle talk.

We hope this book has done exactly that: turned our backs on the idle talk of romantic cultural cryptography while honoring the genuine cultural artifacts that inspired it.

Aksara Jawa and Tembang Macapat are not ciphers. They are writing systems and poetic forms, thousands of years old, carrying the literature, philosophy, and spiritual practice of a civilization. To call a cipher "Javanese" is at best a metaphor and at worst a misappropriation.

What JCP actually demonstrates is that cultural elements can contribute to a cryptosystem in three specific, limited ways:

  1. Structured key material — a poetic meter provides a mnemonic scaffold for a high-entropy human-generated key. The Javanese contribution is ergonomic, not cryptographic.
  2. Domain separation — a script-based encoding ensures that JCP ciphertexts are visually distinct from standard ones, reducing detection by script-unaware filters and providing deniability.
  3. Educational value — building, analyzing, and breaking JCP-Classical is among the best pedagogical exercises in classical cryptanalysis that a teacher could design.

A final word for the practitioner: if you need confidentiality, use standard primitives — XChaCha20-Poly1305, Argon2id, X25519 — and put the Javanese layer on top as an optional encoding for deniability. Do not make the Javanese layer carry the security. If you break that rule, you will have a beautiful poem for your adversary to read.


Colophon. Composed in Yogyakarta and Surakarta, 2025–2026. Set in Lora and Inter. All aksara examples verified against the Unicode Javanese block (U+A980–U+A9DF) in NFC normalization. The authors welcome corrections for any philological or cryptographic errors.

SSN Research

Sainskerta Solusi Nusantara

Tim riset SSN Research terdiri atas para peneliti, insinyur kriptografi, dan filolog yang berfokus pada pengembangan sistem keamanan informasi yang berakar pada budaya Nusantara. Buku ini merupakan bagian dari Seri Kriptografi Budaya — sebuah proyek berkelanjutan untuk mengeksplorasi titik temu antara warisan budaya dan ilmu kriptografi modern.

Kami meyakini bahwa pemahaman mendalam tentang tradisi intelektual Nusantara dapat memperkaya praktik keamanan informasi, tanpa jatuh ke dalam romantisme yang mengorbankan rigour matematis.

Yogyakarta · Surakarta · Indonesia

🖨 Cetak / PDF ← Katalog Riset