# A Squared Cipher

While looking for squares, I stumbled across these numbers, which seemed to form a message:

63305579236
67110649867881
370956417521591056
369501353766724
370193229637137856316486596


Although each individual number looks familiar, I don't remember them having much meaning by themselves. Can you figure out what the message is?

• Yes, but you won't be happy unless I figure out what the method is too. Commented Nov 4, 2023 at 23:54

# Plaintext

YOU HAVE FOUND SOME SQUARES

# Cipher Method

Each word is enciphered separately. The first cipher letter of each word is the same as the first plain letter. The second cipher letter is the result of subtracting the first plain letter from the second plain letter, modulo 26. The subtraction is done by assigning A=1, B=2, ..., Z=26 (or Z=0).

   YOU HAVE FOUND SOME SQUARES
-  YO  HAV  FOUN  SOM  SQUARE
_____________________________
= YPF HSUI FIFSP SVXR SXDFQMN

Next, each word is converted to a single number by taking the numeric equivalents using A=01, B=02, ..., Z=26 and concatenating them:

 YPF               251606
HSUI            08192109
FIFSP         0609061916
SVXR            19222418
SXDFQMN   19240406171314

Finally, each number is squared to produce the numbers in the puzzle.

 YPF               251606   63305579236
HSUI             8192109   67110649867881
FIFSP          609061916   370956417521591056
SVXR            19222418   369501353766724
SXDFQMN   19240406171314   370193229637137856316486596

# Solve path

I fairly assumed that squares were involved, so I took the square root of each number. At a glance, the roots looked like something encoded with A1Z26, which I recognized from experience. Decoding that gave me several short and apparently enciphered words. I started by assuming the first words were "YOU HAVE", a common crib for these kinds of puzzles, and noticed that the first letter was unchanged. I next assumed the remaining words were "FOUND SOME SQUARES", which seemed very likely to be correct given the name of the setter!

By comparing the ciphertext with the assumed plaintext, I noticed that E and O each encipher to a different letter each time, which rules out a monoalphabetic cipher. The unchanging first letter suggests autokeyed ciphers, so I looked at letter pairs. The ME in SOME enciphers to R, and the RE in SQUARES enciphers to M, which implies reciprocal encipherment such as subtraction is involved.

   YOU HAVE FOUND SOME SQUARES
YPF HSUI FIFSP SVXR SXDFQMN

Subtracting the assumed plaintext from itself using an offset of one produced the ciphertext. To decipher this as a plaintext-autokey cipher, the plaintext must be added (again using A=1 and Z=26, or using Vigenere addition with the alphabet ZABCDEFGHIJKLMNOPQRSTUVWXY) to each following letter of the ciphertext as it is recovered:

   YPF HSUI FIFSP SVXR SXDFQMN
+  YO  HAV  FOUN  SOM  SQUARE
_____________________________
= YOU HAVE FOUND SOME SQUARES

• Well done, and thank you for solving my first puzzle! Commented Nov 5, 2023 at 2:58