Anamorphic Cryptography with Elliptic Curve Methods
William J. Buchanan · 2025
Read Anamorphic Cryptography with Elliptic Curve Methods by William J. Buchanan (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-23772.txt.
Introduction
William J Buchanan and Jamie Gilchrist build a two-faced cipher with curve math, in 2025. The head of the text names the build for its recovery trick, a baby-step giant-step search. In such a cipher, one public key locks a note, but two secret keys open it to two unlike notes. A ruler who has to read all mail holds one key. The true note hides for the next key's holder, and the ruler can't see it.
Their build uses the curve kit of a famed coin chain. The hid note rides in the chance value used at lock time, which cancels out when the ruler unlocks. Curve math gives more shield per bit than the older log-based way. The search form of recovery beat plain curve ways by a clear span in their runs.
Catalog record
| CREATOR | William J. Buchanan |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 8 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2505-23772
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Anamorphic Cryptography with Elliptic Curve Methods William J. Buchanan Abstract In 2022, Persianom, Phan and Yung outlined the creation of Anamorphic Cryptography. With this, we can create a public key to encrypt data, and then have two secret keys. These secret keys are used to decrypt the cipher into different messages. So, one secret key is given to the Dictator (who must be able to decrypt all the messages), and the other is given to Alice. Alice can then decrypt the ciphertext to a secret message that the Dictator cannot see. This paper outlines the implementation of Anamorphic Cryptography using ECC (Elliptic Curve Cryptography), such as with the secp256k1 curve. This gives considerable performance improvements over discrete logarithm-based methods. Overall, it outlines how the secret message sent to Alice is hidden within the random nonce value, which is used within the encryption process, and which is cancelled out when the Dictator decrypts the ciphertext. 1 Introduction In cybersecurity, we can use anamorphic cryptography to change the viewpoint of a cipher [ 1 ] . With this, we assume that we have a dictator who will read all of our encrypted data, and will thus have a secret key of sk. The dictator (Mallory) will arrest anyone who sends secret messages that they cannot read. For this, Bob could create two secret keys: sk_{0} and sk_{1} . He sends sk_{0} to Mallory and sk_{1} to Alice (the person to whom Bob wants to send a secret message). As far as Mallory knows, he has the only key for the ciphertext. Dodis et al [ 2 ] liken this this approach to the adding of backdoors into semantically secure schemes is pointless, and where entities might be asked to hand-over their decryption keys. 2 Background With anamorphic encryption, we can have a public key of pk and two private keys of sk0 and sk1 . Bob then can have two messages of: \displaystyle m_{0}=\textrm{"I love the Dictator"} (1) \displaystyle m_{1}=\textrm{"I hate the Dictator"} (2) Bob then encrypts the two messages with the public key: \displaystyle CT=Enc(pk,m_{0},msg_{1}) (3) The Dictator will then decrypt with sk_{0} and reveal the first message: \displaystyle Dec(sk_{0},CT)\rightarrow m_{0} (4) Alice will decrypt with her key and reveal the second message: \displaystyle Dec(sk_{1},CT)\rightarrow m_{1} (5) And, so, the Dictator thinks that they can decrypt the message, and gets, “I love the Dictator”. Alice, though, is able to decrypt the ciphertext to a different message of “I hate the Dictator”. Carnemolla et al. [ 3 ] have outlined that there are certain schemes which are Anamorphic Resistant and that, in some cases, anamorphic encryption is similar to substitution attacks. The methods that support anamorphic encryption include RSA-OAEP, Pailler, Goldwasser-Micali, ElGamal schemes, Cramer-Shoup, and Smooth Projective Hash-based systems. In this case, we will use the ElGamal method [ 4 ] . An implementation of the ElGamal method for anamorphic cryptography is given in [ 5 ] . While discrete logarithm methods have been used to implement Anamorphic Cryptography [ 6 ] , they tend to be slow in their operation. This paper outlines the integration of ElGamal methods with ECC for the implementation of Anamorphic Encryption. 3 ElGamal encryption With ElGamal encryption using elliptic curves [ 7 ] , Alice generates a private key ( x ) and a public key of: \displaystyle Y=x.G (6) and where G is the base point on the curve. She can share this public key ( Y ) with Bob. When Bob wants to encrypt something for Alice, he generates a random value ( r ) and the message value ( M ) and then computes: \displaystyle C_{1}=r.G (7) \displaystyle C_{2}=r.Y+M (8) To decrypt, Alice takes her private key ( x ) and computes: \displaystyle M=C_{2}-x.C_{1} (9) This works because: \displaystyle M=C_{2}-y.C_{1}=r.x.G+M-x.r.G=M (10) Figure 1 outlines how Bob can encrypt data for Alice. Figure 1: ElGamal encryption with ECC 4 Anamorphic Encryption with ECC First, we pick a curve, such as secp256k1, which has a base point of G . Bob can then pick a secret key for the Dictator of sk_{Dictator} . The public key is then: \displaystyle pk=sk_{Dictator}.G (11) Bob then generates a random scalar value of t and takes the secret message of cm , and produces: \displaystyle r=cm+t (12) The value of t will be Alice’s secret key. To encrypt the message of m , Bob uses: \displaystyle rY=r.pk (13) \displaystyle rG=r.G (14) \displaystyle rYval=\textrm{Int}(rY) (15) \displaystyle c0:=rYval+M (16) \displaystyle c1:=rG (17) The cipher is the ( c_{0},c_{1} ). To decrypt by the Dictator: \displaystyle yC=sk_{Dictator}.c1 (19) \displaystyle yC_{val}=\textrm{Int}(yC) (20) \displaystyle res_{Dictator}=c_{0}-yC_{val} (21) Alice can then decrypt with her key ( t ): \displaystyle tc=t.G (23) \displaystyle res_{Alice}=c_{1}-tc (24) Alice will then search through the possible values of res_{Alice} to find the value of cm that matches the elliptic curve point. This works because: \displaystyle res_{Alice}=c_{1}-tc=r.G-t.G=r.G-(r-cm).G=cm.G (25) Some sample code and a test run are given in the appendix. 5 Appendix Some sample code is [ 8 ] : ⬇ package main import ( crand "crypto/rand" "fmt" "math/big" "math/rand" "os" "strconv" "time" "github.com/coinbase/kryptology/pkg/core/curves" ) func main () { rand . Seed ( time . Now (). UnixNano ()) argCount := len ( os . Args [1:]) x := 5 cm :=99 if argCount > 0 { x , _ = strconv . Atoi ( os . Args [1]) } if argCount > 1 { cm , _ = strconv . Atoi ( os . Args [2]) } rand . Seed ( time . Now (). UnixNano ()) curve := curves . K256 () G := curve . Point . Generator () sk_Dictator := curve . Scalar . Random ( crand . Reader ) pk := G . Mul ( sk_Dictator ) t := curve . Scalar . Random ( crand . Reader ) r := curve . Scalar . New ( cm ). Add ( t ) fmt . Printf ( "\n\nDictator ␣ key: ␣ %d\n" , sk_Dictator . BigInt ()) fmt . Printf ( "Alice ␣ key: ␣ %d\n\n" , t . BigInt ()) // Encrypt rY := pk . Mul ( r ) rG := G . Mul ( r ) rYval := new ( big . Int ). SetBytes ( rY . ToAffineUncompressed ()) c0 := new ( big . Int ). Add ( rYval , big . NewInt ( int64 ( x ))) c1 := rG fmt . Printf ( "Encrypted ␣ (c0): ␣ %s\n" , c0 ) fmt . Printf ( "Encrypted ␣ (c1): ␣ %x\n\n" , c1 . ToAffineUncompressed ()) // Decrypt by Dictator yC := c1 . Mul ( sk_Dictator ) yCval := new ( big . Int ). SetBytes ( yC . ToAffineUncompressed ()) res_Dictator := new ( big . Int ). Sub ( c0 , yCval ) fmt . Printf ( "Dictator ␣ message: ␣ %d\n" , x ) fmt . Printf ( "Dictator ␣ recovered: ␣ %d\n" , res_Dictator ) // Decrypt by Alice tc1 := G . Mul ( t ) res_Alice := c1 . Sub ( tc1 ) for i :=0; i <=1000; i ++ { res := G . Mul ( curve . Scalar . New ( i )) if ( res_Alice . Equal ( res )== true