Codebreakers and Codewriters Let's say you have some text, and you want it to send it to your friend, but you don't want anyone else to read it.  That probably means you want to encrypt it so that only you and your friend can read it.  But, there is a problem: you and your friend forgot to agree on an encryption method, so if you send them a message, they won't be able to decrypt it!

After thinking about this for a while, you decide to just send your friend the code to encrypt your message along with the message.  Your friend is very smart, so they can probably figure out how to decrypt the message by studying the encryption method.

Of course, since other people might be reading the message, you want to choose an encryption scheme that makes it as hard as possible to crack (figure out the decryption scheme).

Cops' Task

In this challenge, Cops will play the role of the writer: you will design an encryption scheme that converts strings to strings.  However, this encryption scheme must be bijective, meaning that no two strings must map to another string, and every string can be mapped to by an input.  It must take only one input—the string to be encoded.

You will then post some code that performs the encryption, and a single message encrypted with the scheme detailed by your code.

Since you are paying by the byte to send messages, your score will be the length of your code plus the length of the ciphertext.  If your answer is cracked, you will have a score of infinity.

After one week, you may reveal the text and mark your answer as Safe.  Safe answers are those that cannot be cracked.

Robbers' Task

Robbers will play either as the friend of the writer or the malicious middle man (there is no material difference, but you can role-play as either if it makes it more fun to do so).  They will take the encryption schemes and the ciphertext and attempt to figure out the encrypted message.  Once they figure out the encrypted message, they will post it in a comment. (There will not be a separate robbers' thread for this question.)

The winner will be the robber with the most cracks.



Here is an example of what a cracked solution might look like:
Jelly, 57 + 32 = 89 bytes (cracked)

“¡ḟċ⁷Ḣṡ⁵ĊnɠñḂƇLƒg⁺QfȥẒṾ⁹+=?JṚWġ%Aȧ’
O‘ḅ256b¢*21%¢ḅ¢ḃ256’Ọ


Encrypted message:

EªæBsÊ$Ê³¢?r×­Q4e²?ò[Ý6


As a hex-string:

4518AAE6421973CA
9724CAB3A23F72D7
AD18855134651810
B23F1CF25BDD9036


Explanation:

O‘ḅ256b¢*21%¢ḅ¢ḃ256’Ọ
O                     convert each into codepoint
 ‘ḅ256                convert from bijective base 256 to integer
      b¢              convert from integer to base N
        *21           map each to its 21th power
           %¢         modulo N
             ḅ¢       convert to integer from base N
               ḃ256’  convert from integer to bijective base 256
                    Ọ convert each from codepoint


Where N is encoded by the string “¡ḟċ⁷Ḣṡ⁵ĊnɠñḂƇLƒg⁺QfȥẒṾ⁹+=?JṚWġ%Aȧ’, which is the number 105587021056759938494595233483151378724567978408381355454441180598980268016731.

Also, this is the RSA method with N given above and public key 21. Cracking this is equivalent to finding the two prime factors of N.