THE PATH TO USER OWNED AI #1

The Origins of Cryptography: A Journey Through Ancient Innovations

NEARWEEK
NEAR Protocol
6 min readAug 21, 2024

--

Cryptography, the art of securing communication, has a rich history that dates back thousands of years. Like so many other technological innovations, it was driven by military agendas. Long before the digital age, ancient civilizations were already grappling with the challenge of keeping information secret. The earliest innovations in cryptography, while primitive by today’s standards, laid the groundwork for the sophisticated encryption methods we use today. This blog post explores some of the most significant early milestones in the history of cryptography, beginning in ancient Egypt and culminating in the contributions of the Arab scholar Al-Kindi in the 9th century CE. Finally we examine the two generals dilemma which remains an interesting problem in cryptography and computer science today.

Ancient Egyptian Hieroglyphs (c. 1900 BCE)

The earliest known use of cryptography can be traced back to ancient Egypt, around 1900 BCE. The Egyptians, renowned for their complex hieroglyphic writing system, occasionally employed a form of encryption by using hieroglyphs in unusual ways within inscriptions. Although this method was not cryptography in the modern sense, it represented a primitive attempt to obscure information. Certain messages, particularly those of religious or ceremonial significance, were written using hieroglyphs that deviated from the standard forms. This made the messages more difficult to interpret, effectively restricting their understanding to those who were initiated into the specific code or symbolism.

Scytale Cipher (c. 500 BCE)

Moving forward to ancient Greece, we encounter one of the first known devices explicitly designed for encryption: the scytale. Used by the Spartans for military communication, the scytale was a simple yet effective tool. It consisted of a cylindrical rod around which a strip of parchment was tightly wrapped. The sender would write a message along the length of the cylinder, and when the strip was unwrapped, the letters would appear scrambled. The only way to read the message correctly was to rewrap the strip around a cylinder of the same diameter. This method ensured that the message remained secure during transit, as only those who possessed a scytale of the correct size could decrypt the information.

The Role of Bamboo Slips (c. 475–221 BCE)

In ancient China, bamboo slips were commonly used as a writing medium before the widespread use of paper. These slips were often strung together to form a scroll. Cryptographic messages were sometimes encoded on these bamboo slips using various ciphers. One technique involved rearranging the order of the slips or writing the message in a pattern that required a specific method to read correctly. This method was not only a form of encryption but also a means of ensuring the physical security of the message, as the scrolls could be easily hidden or disguised.

Caesar Cipher (c. 50 BCE)

The next significant innovation in cryptography came from the Roman general Julius Caesar. Around 50 BCE, Caesar developed what is now known as the Caesar Cipher, a simple substitution cipher used to protect military communications. In this method, each letter in the plaintext is shifted a certain number of places down or up the alphabet. For example, with a shift of three, the letter A would be replaced by D, B by E, and so on. Although the Caesar Cipher is relatively easy to break by modern standards, it was an effective tool for maintaining the secrecy of messages in its time. Its simplicity and ease of use ensured that even soldiers with minimal training could encrypt and decrypt messages.

Arab Cryptography (9th Century CE)

The most profound early advances in cryptography occurred in the Islamic Golden Age, particularly through the work of the Arab scholar Al-Kindi. In the 9th century CE, Al-Kindi wrote what is considered the first book on cryptography, “A Manuscript on Deciphering Cryptographic Messages.” Al-Kindi’s work introduced frequency analysis, a method for breaking substitution ciphers by analyzing the frequency of letters in a ciphertext. Since certain letters in any given language appear more frequently than others, Al-Kindi realized that by studying these frequencies, one could potentially reverse-engineer the encryption. This breakthrough was a monumental step in the field of cryptography, shifting it from a craft based on secrecy and obscurity to a science grounded in analysis and mathematics.

The Legacy of Early Cryptography

The development of cryptography has significantly influenced the resolution of challenges in distributed systems, particularly in addressing the “Two Generals’ Dilemma” and Byzantine Fault Tolerance. These concepts are central to modern consensus models in blockchain and other distributed technologies.

The Two Generals’ Dilemma

The Two Generals’ Dilemma illustrates the difficulty of achieving reliable communication over unreliable channels. In this scenario, two generals must coordinate an attack but can only communicate via messengers, who might fail to deliver their messages. Even with encryption, the generals cannot be certain their messages were received and acknowledged, highlighting the challenge of coordination in distributed systems. This dilemma underscores the limitations in achieving absolute certainty in communication, which is crucial for designing reliable distributed systems.

The dilemma and different approaches are covered in this video:

Byzantine Fault Tolerance

The Byzantine Generals’ Problem extends this dilemma by introducing the possibility of some participants acting maliciously. In this problem, several generals must agree on a common strategy, even if some are traitors. Byzantine Fault Tolerance (BFT) systems are designed to ensure consensus even when some components fail or behave unpredictably. BFT is crucial in blockchain networks like Bitcoin and Ethereum, where consensus must be achieved despite the presence of unreliable actors.

The continuous evolution of Cryptography

In summary, the evolution of cryptography has provided critical tools for addressing the Two Generals’ Dilemma and Byzantine Fault Tolerance, enabling the development of secure and resilient distributed systems that are foundational to blockchain technology and beyond. Techniques such as digital signatures and cryptographic hashing ensure the authenticity, integrity, and security of communications within these networks. By leveraging cryptographic methods, BFT systems provide strong security guarantees, enabling decentralised networks to achieve reliable consensus even in the presence of faults or malicious participants.

About NEARWEEK

NEARWEEK is the ultimate destination for all things related to NEAR.
As the official NEAR Protocol newsletter and community platform, NEARWEEK goes beyond journalism in order to actively celebrate, participate in, and contribute to the NEAR ecosystem.

NEARWEEK.com | Twitter

About NEAR Protocol

NEAR is on a mission to empower and onboard a billion users to the limitless possibilities of Web3 via User Owned AI and Chain Abstraction. Leveraging its high-performance, carbon-neutral protocol, which is swift, secure, and scalable, NEAR offers a common layer for browsing and discovering the Open Web.

NEAR.org | NEAR AI | NEAR Chain Abstraction | Twitter

--

--

NEARWEEK
NEAR Protocol

The Official NEAR Protocol Newsletter & Community Platform.