Example of the Mirdek card cipher at work

These examples use the representation from the cipher description pages; the table is reproduced below for convenience.

  A B C D E F G H I J K L M
Black Ace 2 3 4 5 6 7 8 9 10 Jack Queen King
Red Ace 2 3 4 5 6 7 8 9 10 Jack Queen King
  N O P Q R S T U V W X Y Z

Initialisation

Initialisation vector: IPDZO WKGST VARME QYBCF JNHUL
Key: KEYPHRASE
Plaintext:
PLAIN TEXTX

Initial state of piles:
Discard: 
Right:   IPDZOWKGSTVARMEQYBCFJNHULX
Left:    ABCDEFGHIJKLMNOPQRSTUVWXYZ

Keying

Count cut:
Top card of discard pile: X
Putting together pile: YZ + ABCDEFGHIJKLMNOPQRSTUVWX
Discard: X
Right:   IPDZOWKGSTVARMEQYBCFJNHUL
Left:    YZABCDEFGHIJKLMNOPQRSTUVWX

Mixing in K from the passphrase:
Dealing cards: YZABCDEFGHIJK
Putting together pile: LMNOPQRSTUVWX + KIGECAY + JHFDBZ
Discard: X
Right:   IPDZOWKGSTVARMEQYBCFJNHUL
Left:    LMNOPQRSTUVWXKIGECAYJHFDBZ

Count cut:
Top card of discard pile: L
Putting together pile: XKIGECAYJHFDBZ + LMNOPQRSTUVW
Discard: LX
Right:   IPDZOWKGSTVARMEQYBCFJNHU
Left:    XKIGECAYJHFDBZLMNOPQRSTUVW

Mixing in E from the passphrase:
Dealing cards: XKIGE
Putting together pile: CAYJHFDBZLMNOPQRSTUVW + EIX + GK
Discard: LX
Right:   IPDZOWKGSTVARMEQYBCFJNHU
Left:    CAYJHFDBZLMNOPQRSTUVWEIXGK

Count cut:
Top card of discard pile: U
Putting together pile: EIXGK + CAYJHFDBZLMNOPQRSTUVW
Discard: ULX
Right:   IPDZOWKGSTVARMEQYBCFJNH
Left:    EIXGKCAYJHFDBZLMNOPQRSTUVW

Mixing in Y from the passphrase:
Dealing cards: EIXGKCAY
Putting together pile: JHFDBZLMNOPQRSTUVW + YCGI + AKXE
Discard: ULX
Right:   IPDZOWKGSTVARMEQYBCFJNH
Left:    JHFDBZLMNOPQRSTUVWYCGIAKXE

Count cut:
Top card of discard pile: H
Putting together pile: NOPQRSTUVWYCGIAKXE + JHFDBZLM
Discard: HULX
Right:   IPDZOWKGSTVARMEQYBCFJN
Left:    NOPQRSTUVWYCGIAKXEJHFDBZLM

Mixing in P from the passphrase:
Dealing cards: NOP
Putting together pile: QRSTUVWYCGIAKXEJHFDBZLM + PN + O
Discard: HULX
Right:   IPDZOWKGSTVARMEQYBCFJN
Left:    QRSTUVWYCGIAKXEJHFDBZLMPNO

Count cut:
Top card of discard pile: N
Putting together pile: EJHFDBZLMPNO + QRSTUVWYCGIAKX
Discard: NHULX
Right:   IPDZOWKGSTVARMEQYBCFJ
Left:    EJHFDBZLMPNOQRSTUVWYCGIAKX

Mixing in H from the passphrase:
Dealing cards: EJH
Putting together pile: FDBZLMPNOQRSTUVWYCGIAKX + HE + J
Discard: NHULX
Right:   IPDZOWKGSTVARMEQYBCFJ
Left:    FDBZLMPNOQRSTUVWYCGIAKXHEJ

Count cut:
Top card of discard pile: J
Putting together pile: RSTUVWYCGIAKXHEJ + FDBZLMPNOQ
Discard: JNHULX
Right:   IPDZOWKGSTVARMEQYBCF
Left:    RSTUVWYCGIAKXHEJFDBZLMPNOQ

Mixing in R from the passphrase:
Dealing cards: R
Putting together pile: STUVWYCGIAKXHEJFDBZLMPNOQ + R + 
Discard: JNHULX
Right:   IPDZOWKGSTVARMEQYBCF
Left:    STUVWYCGIAKXHEJFDBZLMPNOQR

Count cut:
Top card of discard pile: F
Putting together pile: CGIAKXHEJFDBZLMPNOQR + STUVWY
Discard: FJNHULX
Right:   IPDZOWKGSTVARMEQYBC
Left:    CGIAKXHEJFDBZLMPNOQRSTUVWY

Mixing in A from the passphrase:
Dealing cards: CGIA
Putting together pile: KXHEJFDBZLMPNOQRSTUVWY + AG + IC
Discard: FJNHULX
Right:   IPDZOWKGSTVARMEQYBC
Left:    KXHEJFDBZLMPNOQRSTUVWYAGIC

Count cut:
Top card of discard pile: C
Putting together pile: EJFDBZLMPNOQRSTUVWYAGIC + KXH
Discard: CFJNHULX
Right:   IPDZOWKGSTVARMEQYB
Left:    EJFDBZLMPNOQRSTUVWYAGICKXH

Mixing in S from the passphrase:
Dealing cards: EJFDBZLMPNOQRS
Putting together pile: TUVWYAGICKXH + SQNMZDJ + ROPLBFE
Discard: CFJNHULX
Right:   IPDZOWKGSTVARMEQYB
Left:    TUVWYAGICKXHSQNMZDJROPLBFE

Count cut:
Top card of discard pile: B
Putting together pile: VWYAGICKXHSQNMZDJROPLBFE + TU
Discard: BCFJNHULX
Right:   IPDZOWKGSTVARMEQY
Left:    VWYAGICKXHSQNMZDJROPLBFETU

Mixing in E from the passphrase:
Dealing cards: VWYAGICKXHSQNMZDJROPLBFE
Putting together pile: TU + EBPRDMQHKIAW + FLOJZNSXCGYV
Discard: BCFJNHULX
Right:   IPDZOWKGSTVARMEQY
Left:    TUEBPRDMQHKIAWFLOJZNSXCGYV

Mixing

Discarding rest of right pile and swapping:
Discard: 
Right:   TUEBPRDMQHKIAWFLOJZNSXCGYV
Left:    BCFJNHULXIPDZOWKGSTVARMEQY

Mixing left pile using right:
Top card of discard pile: V
Dealing cards: BCFJNHULXIPDZOWKGSTV
Putting together pile: ARMEQY + VSKODILHJC + TGWZPXUNFB
Discard: V
Right:   TUEBPRDMQHKIAWFLOJZNSXCGY
Left:    ARMEQYVSKODILHJCTGWZPXUNFB

Mixing left pile using right:
Top card of discard pile: Y
Dealing cards: ARMEQY
Putting together pile: VSKODILHJCTGWZPXUNFB + YER + QMA
Discard: YV
Right:   TUEBPRDMQHKIAWFLOJZNSXCG
Left:    VSKODILHJCTGWZPXUNFBYERQMA

Mixing left pile using right:
Top card of discard pile: G
Dealing cards: VSKODILHJCTG
Putting together pile: WZPXUNFBYERQMA + GCHIOS + TJLDKV
Discard: GYV
Right:   TUEBPRDMQHKIAWFLOJZNSXC
Left:    WZPXUNFBYERQMAGCHIOSTJLDKV

Mixing left pile using right:
Top card of discard pile: C
Dealing cards: WZPXUNFBYERQMAGC
Putting together pile: HIOSTJLDKV + CAQEBNXZ + GMRYFUPW
Discard: CGYV
Right:   TUEBPRDMQHKIAWFLOJZNSX
Left:    HIOSTJLDKVCAQEBNXZGMRYFUPW

Mixing left pile using right:
Top card of discard pile: X
Dealing cards: HIOSTJLDKVCAQEBNX
Putting together pile: ZGMRYFUPW + XBQCKLTOH + NEAVDJSI
Discard: XCGYV
Right:   TUEBPRDMQHKIAWFLOJZNS
Left:    ZGMRYFUPWXBQCKLTOHNEAVDJSI

Mixing left pile using right:
Top card of discard pile: S
Dealing cards: ZGMRYFUPWXBQCKLTOHNEAVDJS
Putting together pile: I + SDANOLCBWUYMZ + JVEHTKQXPFRG
Discard: SXCGYV
Right:   TUEBPRDMQHKIAWFLOJZN
Left:    ISDANOLCBWUYMZJVEHTKQXPFRG

Mixing left pile using right:
Top card of discard pile: N
Dealing cards: ISDAN
Putting together pile: OLCBWUYMZJVEHTKQXPFRG + NDI + AS
Discard: NSXCGYV
Right:   TUEBPRDMQHKIAWFLOJZ
Left:    OLCBWUYMZJVEHTKQXPFRGNDIAS

Mixing left pile using right:
Top card of discard pile: Z
Dealing cards: OLCBWUYMZ
Putting together pile: JVEHTKQXPFRGNDIAS + ZYWCO + MUBL
Discard: ZNSXCGYV
Right:   TUEBPRDMQHKIAWFLOJ
Left:    JVEHTKQXPFRGNDIASZYWCOMUBL

Mixing left pile using right:
Top card of discard pile: J
Dealing cards: J
Putting together pile: VEHTKQXPFRGNDIASZYWCOMUBL + J + 
Discard: JZNSXCGYV
Right:   TUEBPRDMQHKIAWFLO
Left:    VEHTKQXPFRGNDIASZYWCOMUBLJ

Mixing left pile using right:
Top card of discard pile: O
Dealing cards: VEHTKQXPFRGNDIASZYWCO
Putting together pile: MUBLJ + OWZADGFXKHV + CYSINRPQTE
Discard: OJZNSXCGYV
Right:   TUEBPRDMQHKIAWFL
Left:    MUBLJOWZADGFXKHVCYSINRPQTE

Mixing left pile using right:
Top card of discard pile: L
Dealing cards: MUBL
Putting together pile: JOWZADGFXKHVCYSINRPQTE + LU + BM
Discard: LOJZNSXCGYV
Right:   TUEBPRDMQHKIAWF
Left:    JOWZADGFXKHVCYSINRPQTELUBM

Mixing left pile using right:
Top card of discard pile: F
Dealing cards: JOWZADGF
Putting together pile: XKHVCYSINRPQTELUBM + FDZO + GAWJ
Discard: FLOJZNSXCGYV
Right:   TUEBPRDMQHKIAW
Left:    XKHVCYSINRPQTELUBMFDZOGAWJ

Mixing left pile using right:
Top card of discard pile: W
Dealing cards: XKHVCYSINRPQTELUBMFDZOGAW
Putting together pile: J + WGZFBLTPNSCHX + AODMUEQRIYVK
Discard: WFLOJZNSXCGYV
Right:   TUEBPRDMQHKIA
Left:    JWGZFBLTPNSCHXAODMUEQRIYVK

Mixing left pile using right:
Top card of discard pile: A
Dealing cards: JWGZFBLTPNSCHXA
Putting together pile: ODMUEQRIYVK + AHSPLFGJ + XCNTBZW
Discard: AWFLOJZNSXCGYV
Right:   TUEBPRDMQHKI
Left:    ODMUEQRIYVKAHSPLFGJXCNTBZW

Mixing left pile using right:
Top card of discard pile: I
Dealing cards: ODMUEQRI
Putting together pile: YVKAHSPLFGJXCNTBZW + IQUD + REMO
Discard: IAWFLOJZNSXCGYV
Right:   TUEBPRDMQHK
Left:    YVKAHSPLFGJXCNTBZWIQUDREMO

Mixing left pile using right:
Top card of discard pile: K
Dealing cards: YVK
Putting together pile: AHSPLFGJXCNTBZWIQUDREMO + KY + V
Discard: KIAWFLOJZNSXCGYV
Right:   TUEBPRDMQH
Left:    AHSPLFGJXCNTBZWIQUDREMOKYV

Mixing left pile using right:
Top card of discard pile: H
Dealing cards: AH
Putting together pile: SPLFGJXCNTBZWIQUDREMOKYV + H + A
Discard: HKIAWFLOJZNSXCGYV
Right:   TUEBPRDMQ
Left:    SPLFGJXCNTBZWIQUDREMOKYVHA

Mixing left pile using right:
Top card of discard pile: Q
Dealing cards: SPLFGJXCNTBZWIQ
Putting together pile: UDREMOKYVHA + QWBNXGLS + IZTCJFP
Discard: QHKIAWFLOJZNSXCGYV
Right:   TUEBPRDM
Left:    UDREMOKYVHAQWBNXGLSIZTCJFP

Mixing left pile using right:
Top card of discard pile: M
Dealing cards: UDREM
Putting together pile: OKYVHAQWBNXGLSIZTCJFP + MRU + ED
Discard: MQHKIAWFLOJZNSXCGYV
Right:   TUEBPRD
Left:    OKYVHAQWBNXGLSIZTCJFPMRUED

Mixing left pile using right:
Top card of discard pile: D
Dealing cards: OKYVHAQWBNXGLSIZTCJFPMRUED
Putting together pile:  + DUMFCZSGNWAVK + ERPJTILXBQHYO
Discard: DMQHKIAWFLOJZNSXCGYV
Right:   TUEBPR
Left:    DUMFCZSGNWAVKERPJTILXBQHYO

Mixing left pile using right:
Top card of discard pile: R
Dealing cards: DUMFCZSGNWAVKER
Putting together pile: PJTILXBQHYO + RKANSCMD + EVWGZFU
Discard: RDMQHKIAWFLOJZNSXCGYV
Right:   TUEBP
Left:    PJTILXBQHYORKANSCMDEVWGZFU

Mixing left pile using right:
Top card of discard pile: P
Dealing cards: P
Putting together pile: JTILXBQHYORKANSCMDEVWGZFU + P + 
Discard: PRDMQHKIAWFLOJZNSXCGYV
Right:   TUEB
Left:    JTILXBQHYORKANSCMDEVWGZFUP

Mixing left pile using right:
Top card of discard pile: B
Dealing cards: JTILXB
Putting together pile: QHYORKANSCMDEVWGZFUP + BLT + XIJ
Discard: BPRDMQHKIAWFLOJZNSXCGYV
Right:   TUE
Left:    QHYORKANSCMDEVWGZFUPBLTXIJ

Mixing left pile using right:
Top card of discard pile: E
Dealing cards: QHYORKANSCMDE
Putting together pile: VWGZFUPBLTXIJ + EMSARYQ + DCNKOH
Discard: EBPRDMQHKIAWFLOJZNSXCGYV
Right:   TU
Left:    VWGZFUPBLTXIJEMSARYQDCNKOH

Mixing left pile using right:
Top card of discard pile: U
Dealing cards: VWGZFU
Putting together pile: PBLTXIJEMSARYQDCNKOH + UZW + FGV
Discard: UEBPRDMQHKIAWFLOJZNSXCGYV
Right:   T
Left:    PBLTXIJEMSARYQDCNKOHUZWFGV

Mixing left pile using right:
Top card of discard pile: T
Dealing cards: PBLT
Putting together pile: XIJEMSARYQDCNKOHUZWFGV + TB + LP
Discard: TUEBPRDMQHKIAWFLOJZNSXCGYV
Right:   
Left:    XIJEMSARYQDCNKOHUZWFGVTBLP

Swapping piles:
Discard: 
Right:   XIJEMSARYQDCNKOHUZWFGVTBLP
Left:    TUEBPRDMQHKIAWFLOJZNSXCGYV

Encryption

Count cut:
Top card of discard pile: P
Putting together pile: OJZNSXCGYV + TUEBPRDMQHKIAWFL
Discard: P
Right:   XIJEMSARYQDCNKOHUZWFGVTBL
Left:    OJZNSXCGYVTUEBPRDMQHKIAWFL

Encrypting letter: P
Dealing cards: OJZNSXCGYVTUEBP
Putting together pile: RDMQHKIAWFL + PETYCSZO + BUVGXNJ
Ciphertext letter: O
Discard: P
Right:   XIJEMSARYQDCNKOHUZWFGVTBL
Left:    RDMQHKIAWFLPETYCSZOBUVGXNJ

Count cut:
Top card of discard pile: L
Putting together pile: ETYCSZOBUVGXNJ + RDMQHKIAWFLP
Discard: LP
Right:   XIJEMSARYQDCNKOHUZWFGVTB
Left:    ETYCSZOBUVGXNJRDMQHKIAWFLP

Encrypting letter: L
Dealing cards: ETYCSZOBUVGXNJRDMQHKIAWFL
Putting together pile: P + LWIHMRNGUOSYE + FAKQDJXVBZCT
Ciphertext letter: Y
Discard: LP
Right:   XIJEMSARYQDCNKOHUZWFGVTB
Left:    PLWIHMRNGUOSYEFAKQDJXVBZCT

Count cut:
Top card of discard pile: B
Putting together pile: WIHMRNGUOSYEFAKQDJXVBZCT + PL
Discard: BLP
Right:   XIJEMSARYQDCNKOHUZWFGVT
Left:    WIHMRNGUOSYEFAKQDJXVBZCTPL

Encrypting letter: A
Dealing cards: WIHMRNGUOSYEFA
Putting together pile: KQDJXVBZCTPL + AESUNMI + FYOGRHW
Ciphertext letter: N
Discard: BLP
Right:   XIJEMSARYQDCNKOHUZWFGVT
Left:    KQDJXVBZCTPLAESUNMIFYOGRHW

Count cut:
Top card of discard pile: T
Putting together pile: YOGRHW + KQDJXVBZCTPLAESUNMIF
Discard: TBLP
Right:   XIJEMSARYQDCNKOHUZWFGV
Left:    YOGRHWKQDJXVBZCTPLAESUNMIF

Encrypting letter: I
Dealing cards: YOGRHWKQDJXVBZCTPLAESUNMI
Putting together pile: F + INSAPCBXDKHGY + MUELTZVJQWRO
Ciphertext letter: Y
Discard: TBLP
Right:   XIJEMSARYQDCNKOHUZWFGV
Left:    FINSAPCBXDKHGYMUELTZVJQWRO

Count cut:
Top card of discard pile: V
Putting together pile: QWRO + FINSAPCBXDKHGYMUELTZVJ
Discard: VTBLP
Right:   XIJEMSARYQDCNKOHUZWFG
Left:    QWROFINSAPCBXDKHGYMUELTZVJ

Encrypting letter: N
Dealing cards: QWROFIN
Putting together pile: SAPCBXDKHGYMUELTZVJ + NFRQ + IOW
Ciphertext letter: G
Discard: VTBLP
Right:   XIJEMSARYQDCNKOHUZWFG
Left:    SAPCBXDKHGYMUELTZVJNFRQIOW

Count cut:
Top card of discard pile: G
Putting together pile: KHGYMUELTZVJNFRQIOW + SAPCBXD
Discard: GVTBLP
Right:   XIJEMSARYQDCNKOHUZWF
Left:    KHGYMUELTZVJNFRQIOWSAPCBXD

Encrypting letter: T
Dealing cards: KHGYMUELT
Putting together pile: ZVJNFRQIOWSAPCBXD + TEMGK + LUYH
Ciphertext letter: I
Discard: GVTBLP
Right:   XIJEMSARYQDCNKOHUZWF
Left:    ZVJNFRQIOWSAPCBXDTEMGKLUYH

Count cut:
Top card of discard pile: F
Putting together pile: QIOWSAPCBXDTEMGKLUYH + ZVJNFR
Discard: FGVTBLP
Right:   XIJEMSARYQDCNKOHUZW
Left:    QIOWSAPCBXDTEMGKLUYHZVJNFR

Encrypting letter: E
Dealing cards: QIOWSAPCBXDTE
Putting together pile: MGKLUYHZVJNFR + EDBPSOQ + TXCAWI
Ciphertext letter: M
Discard: FGVTBLP
Right:   XIJEMSARYQDCNKOHUZW
Left:    MGKLUYHZVJNFREDBPSOQTXCAWI

Count cut:
Top card of discard pile: W
Putting together pile: AWI + MGKLUYHZVJNFREDBPSOQTXC
Discard: WFGVTBLP
Right:   XIJEMSARYQDCNKOHUZ
Left:    AWIMGKLUYHZVJNFREDBPSOQTXC

Encrypting letter: X
Dealing cards: AWIMGKLUYHZVJNFREDBPSOQTX
Putting together pile: C + XQSBEFJZYLGIA + TOPDRNVHUKMW
Ciphertext letter: Y
Discard: WFGVTBLP
Right:   XIJEMSARYQDCNKOHUZ
Left:    CXQSBEFJZYLGIATOPDRNVHUKMW

Count cut:
Top card of discard pile: Z
Putting together pile:  + CXQSBEFJZYLGIATOPDRNVHUKMW
Discard: ZWFGVTBLP
Right:   XIJEMSARYQDCNKOHU
Left:    CXQSBEFJZYLGIATOPDRNVHUKMW

Encrypting letter: T
Dealing cards: CXQSBEFJZYLGIAT
Putting together pile: OPDRNVHUKMW + TILZFBQC + AGYJESX
Ciphertext letter: O
Discard: ZWFGVTBLP
Right:   XIJEMSARYQDCNKOHU
Left:    OPDRNVHUKMWTILZFBQCAGYJESX

Count cut:
Top card of discard pile: U
Putting together pile: YJESX + OPDRNVHUKMWTILZFBQCAG
Discard: UZWFGVTBLP
Right:   XIJEMSARYQDCNKOH
Left:    YJESXOPDRNVHUKMWTILZFBQCAG

Encrypting letter: X
Dealing cards: YJESX
Putting together pile: OPDRNVHUKMWTILZFBQCAG + XEY + SJ
Ciphertext letter: E
Discard: UZWFGVTBLP
Right:   XIJEMSARYQDCNKOH
Left:    OPDRNVHUKMWTILZFBQCAGXEYSJ

Ciphertext:  (IV this side) -v-
IPDZO WKGST VARME QYBCF JNHUL OYNYG IMYOE