John D. Cook 7/27/2026

Hiding data in permutations

Read Original

This article discusses the concept of storing cryptographic keys as permutations of a deck of cards, specifically using 52 playing cards to encode a 225-bit key. It explains the mathematical background of ranking (mapping a permutation to an integer) and unranking (mapping an integer to a permutation), with complexity ranging from O(n²) to O(n log n) and O(n). The article demonstrates practical implementation using SymPy's Permutation class, showing how to unrank and rank permutations lexicographically. It includes code examples for generating a random 225-bit number and converting it to a permutation, verifying the round-trip conversion. The content is technical and focused on algorithms, combinatorics, and cryptography, making it relevant to IT/technology.

Hiding data in permutations

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser