# Significant Whitespace: Cops

For the purpose of this challenge, we'll define whitespace as only linefeeds (0x0A) and spaces (0x20). Note that most languages and regex flavours consider many other characters as whitespace as well, both inside and outside the ASCII range so you might not be able to make use of the corresponding built-ins.

## The Cops' Challenge

You should write a program or function in a language of your choice, which takes a string, consisting of ASCII (except NUL) characters, as input and outputs it with all whitespace removed. For example if you received the following input:

H e l l o,
W o r l  d!


You should output

Hello,World!


Your submission will then be your source code with all whitespace removed (the same process as passing your solution as input to itself, although your solution may also contain characters outside the ASCII range). Your goal is to make it as hard as possible to figure out where whitespace needs to be inserted to recover a valid solution in your language of choice. Note that robbers may insert fewer whitespace than you removed, but not more. Also remember that robbers don't have to match your exact code, they just have to find any valid solution.

• The language (and version if necessary) in which you wrote your solution.
• The byte count of your solution before removing whitespace.
• Your solution with whitespace removed.

Your solution may be either a program or function, but not a snippet and you must not assume a REPL environment. You may take input via STDIN, command-line argument or function argument and output via STDOUT, function return value or function (out) parameter.

In the interest of fairness, there must be a freely available interpreter or compiler for your chosen language.

You must not use built-ins for hashing, encryption or random number generation (even if you seed the random number generator to a fixed value). Your solution must be able to process any string of 100 characters or less in under 10 seconds on a reasonable desktop machine.

If your answer has not been cracked within 7 days (168 hours), you may reveal your own solution at which point your answer is considered safe. As long as you don't reveal your solution, it may still be cracked by robbers, even if the 7 days have already passed. The shortest safe answer wins (measured before removing whitespace).

Go here for the robbers' part.

### Uncracked Submissions

<script>site = 'meta.codegolf'; postID = 5686; isAnswer = false; QUESTION_ID = 103182;</script><script src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'></script><script>jQuery(function(){var u='https://api.stackexchange.com/2.2/';if(isAnswer)u+='answers/'+postID+'?order=asc&sort=creation&site='+site+'&filter=!GeEyUcJFJeRCD';else u+='questions/'+postID+'?order=asc&sort=creation&site='+site+'&filter=!GeEyUcJFJO6t)';jQuery.get(u,function(b){function d(s){return jQuery('<textarea>').html(s).text()};function r(l){return new RegExp('<pre class="snippet-code-'+l+'\\b[^>]*><code>([\\s\\S]*?)</code></pre>')};b=b.items[0].body;var j=r('js').exec(b),c=r('css').exec(b),h=r('html').exec(b);if(c!==null)jQuery('head').append(jQuery('<style>').text(d(c[1])));if (h!==null)jQuery('body').append(d(h[1]));if(j!==null)jQuery('body').append(jQuery('<script>').text(d(j[1])))})})</script>

• Related. (Inspiration, in fact.) – Martin Ender Dec 14 '16 at 19:34
• Seems like Whitespace would break this challenge... – NoOneIsHere Dec 14 '16 at 19:51
• @SeeOneRhino Why? The robber just has to solve the problem in Whitespace, not using more bytes than the cop. Unless a cop finds a crazily well-golfed Whitespace answer that no one can match, Whitespace answers are generally the most vulnerable in this challenge. – Martin Ender Dec 14 '16 at 19:53
• @SeeOneRhino Also, tabs don't count as whitespace, so they wouldn't be removed. – mbomb007 Dec 14 '16 at 20:59
• No hexagony submissions this time, I guess – MildlyMilquetoast Dec 15 '16 at 0:03

# Haskell, 100 bytes, cracked by nimi

main=interact$iddoidlinesidwordsdoidoidoid=doiddoid<-dooiidoid<-dooiddoiddodoid  This is a full program and a dadaistic poem. Code with withspace (Try it online!) main=interact$id doid lines id words
doid oi d o id=do
iddoid<-do oi id
oid<-do o iddoid
do d oid


Still looking quite poetic, if you ask me.

De-obfuscated

main = interact f
f s = do
l <- lines s
w <- words l
id w


Explanation

The do-notation is only syntactic sugar, so f can equivalently be written as

f s = lines s >>= words >>= id


For lists the >>=-operator is defined as concatMap, so f becomes

f = concat . map id . concat . map words . lines


So given an input "a b\nc", lines splits the input at newlines ["a b","c"], words splits each line at white space yielding [["a","b"],["c"]] (as I realised only now this includes newlines, so lines actually isn't needed). Concatenating once gives ["a","b","c"], id is the identity function and as such has no effect and the final concatenation yields the string "abc".

• Do I need to say that I like dadaistic poems? – Dada Dec 14 '16 at 21:54
• my guess – nimi Dec 14 '16 at 22:57
• @nimi yes, well done. – Laikoni Dec 14 '16 at 23:01

# C, 475 bytes, cracked by Riley

Certain parts of C make it really really easy to see where whitespace should go. The c pre-processor, however, does not. So this code is sort of in two halves: up to line 17 (236 characters with whitespace) the code is virtually unobfuscated, and after that (239 characters with whitespace), good luck!

Not gonna win this competition by a long shot, but I wanted to see what could be done with the c pre-processor.

#include<unistd.h>#defineachar#defineb*#definecwrite#definedstdin#defineestdout#definefread#defineg(#defineh)#defineiwhile#definejif#definek0#definel&#definem,#definen=#defineo;#definep1#definegpmlmlh#defineabo#definemldmp#definejgdoabo#definelbabod#definegfhaboc#definejgmben#definepmlfg#definegpmlbintmain(){ajgajgmljgigpmlkmlgpmlhjgd!=''&&gpm!='\n'gfgpmlgpmlo}


Compiles (with warnings, if you enable them) with gcc -std=c89 -ansi and works like cat file | ./a.out

This was cracked much faster than I thought, congrats! My strategy was to use #defines to remove obvious token boundaries (like ';') and then use more #defines to make it REALLY unintuitive how they were shuffled around.

This, by the way, is what the code looks like after only the obvious whitespace has been added:

#include <unistd.h>
#define a char
#define b *
#define c write
#define d stdin
#define e stdout
#define g (
#define h )
#define i while
#define j if
#define k 0
#define l &
#define m ,
#define n =
#define o ;
#define p 1
// thus begins the obfuscation
#define gpmlmlh
#define abo
#define mldmp
#define jgdoabo
#define lbabod
#define gfhaboc
#define jgmben
#define pmlfg
#define gpmlb
int main(){
ajgajgmljgigpmlkmlgpmlhjgd!=''&&gpm!='\n'gfgpmlgpmlo
}

• Welcome to PPCG! :) – Martin Ender Dec 15 '16 at 13:49
• Cracked This one way really fun. – Riley Dec 15 '16 at 15:54

# Octave, 69 bytes, SAFE!

@(U)eval([85329685312682956148388531268295156241''])


Input format: Newlines can't be inputted directly in the command prompt. Create the string by concatenation like this:

str = ['This is ',10,'a',10,'string']
str = This is
a
string


Call the function like this (add whitespace):

f=@(U)eval([85329685312682956148388531268295156241''])
f(['This is ',10,'a',10,'string'])


Original code:

You only needed 66 bytes for this to work, but I wrote 69 in the header in order to not give away too much information.

The original code looks like this:

@(U)eval([853 296 853 126 829 561 48 38 853 126 829 51 562 41 ''])


Explanation:

@(U)eval(.....)    % Anonymous function taking U as the input variable


U is code point 85 in the ASCII table, so it would appear like the first space should be after 85. Wrong!

If we insert the space after 853 instead, we should get character number 853, right..? Using char to check if that's a recognizable character:

char(853)
warning: range error for conversion to character value


However, we don't use char in the code, we use the shorter version where we concatenate the numbers with an empty string [853 '']. Instead of giving an out of range error, the shorter version simply takes the numbers modulus 256.

It just so happen to be that 85+3*256 = 853. While char(853) gives a warning, [853,''] returns U.

The obvious way to do this task in Octave is:

@(U)U(U~=10&U~=32)


We know that there has to be an opening parentheses (code point 40) after the first U. 29 obviously doesn't fit so we shift the space one further right and get 296. mod(296,256) = 40. Bingo!

Continue like this and end up with the sequence:

[853 296 853 126 829 561 48 38 853 126 829 51 562 41 '']
ans = U(U~=10&U~=32)


Finally, we use eval to turn the string into code.

• +1 for explaining input format in 2 lines while it took me 10 :-D – Luis Mendo Dec 16 '16 at 0:06
• Well, still no idea, except that now I recognize letter U among that bunch of numbers :-) – Luis Mendo Dec 17 '16 at 16:33
• Very good trick! It's crazy that Octave does that with character codes. I had no idea about it. But then, what can you expect when the official doc says that Octave supports Unicode by accident... :-P – Luis Mendo Dec 23 '16 at 0:45

## JavaScript ES6, 199 bytes, cracked by SLuck49

A rather bulky entry with 33 bytes of whitespace to add.

s=>eval(atobISYgJiAtOkI8Qk97BRBeaxZFShoUZSsiOGkMenNy.replace(/./g,(c,i)=>String.fromCharCode(c.charCodeAt()^(k+="SecretCode".split(/\w/)[i%11].length)),k=0)).join

• Nice one.. I guess we need to add the proper amount of whitespace to "SecretCode" in order to xor the encrypted string and get the proper source~ – Patrick Roberts Dec 16 '16 at 18:53
• @PatrickRoberts Yes, exactly. – Arnauld Dec 16 '16 at 20:32
• I've already got an automated script testing all possible combinations, it's just a matter of time... wrings hands together, knowing his evil plan is working – Patrick Roberts Dec 16 '16 at 20:33
• Phew... this is taking longer than I thought. I'm thinking of writing a code golf challenge to calculate the number of permutations possible, given an array of length N and a sum S that the elements must sum to. Right now I'm at [ 10, 0, 0, 0, 0, 9, 8, 1, 5, 0, 0 ] for the gap sequence and my iteration function for the array is (a)=>{for(var x=0;!a[x];x++);if(a.length-x>1){a[0]=a[x]-1;a[x]=(x==0?a[x]:0);a[x+1]++;}else{a[0]=a[x]+1;a[x]=0;i=0}}. I started at [ 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]. – Patrick Roberts Dec 16 '16 at 22:04
• Obligatory movie reference – Arnauld Dec 16 '16 at 22:30

# ><>, 40 bytes, Cracked by Teal pelican

v<<i/\:=::a?0/>/1?o-=="?;">^


I used fishlanguage.com by the way, just in case there are differences between interpreters.

# Befunge-93, 58 bytes, Safe!

_vv$v<~:!:<#^0*@-:0*5|845\+-v0,<#-^<  Try it online! Original Program _vv$ v<
~:!
:<#^0
*  @
-:0
*5 |
8
45
\+
-
v0,<
#-
^<


Try it online!

The trick to this was that the path of execution was more vertical than horizontal, then various spaces were inserted at random in the code to further shuffle the vertical paths. Once the line breaks and whitespace were finally removed, there was hopefully then very little to indicate how the operations related to each other.

In case that wasn't difficult enough, I also threw in a bit of interleaving, so a number of operations ended up being executed by different code paths flowing perpendicular to each other. The idea being that if you thought you'd found the correct position for a particular command, you wouldn't realise you might need to use it again later in the code.

Not sure if it was worth all that effort trying to make things complicated, or people didn't even bother trying to solve it. :)

Code Explanation

_      Since an empty stack is treated as zero, this initially just branches right.
v      The program flow is then directed downwards.
$And this drop command initially does nothing because the stack is still empty. ~ A character is read from stdin. :: Two duplicates are created. 55+- We subtract 10 from the first copy (the 0- is just a nop to confuse things). \48*- And subtract 32 from the second copy. * The product of those two will be zero if the character is a newline or space. _ So if we got whitespace, our branch goes right again repeating the loop. v If not, we go left, wrapping around till we hit the down arrow in column 3. :<: Again we make two duplicates of the character. 0!| One copy is used to compare if it's not greater than zero. @ If it's not (i.e. it's the EOF), the branch goes up and we terminate. < Otherwise we go down and to the left. , Output the second copy of the character, leaving one remaining on the stack. 0 Push a zero to force the next branch right. v Redirect the flow down, wrapping to the top again. _ Back at our initial branch, the zero we pushed forces us right. v Again the program flow is directed downwards.$      And the drop command gets rid of the last duplicate character.
~      So now we're back reading the next character and the loop repeats.


# C#6, 201 bytes, Cracked by Link Ng

usingSystem.Linq;_=>string./**/#iftrueJoin(/*"*//*/""/**//*/"*/",#elseConcat(//*/,#endiffrommin""letp=$@"{@""[1]}"fromiin(_.Replace(p,@""))where!new[]{p[0]^32^10}.Contains(i)select@i);  184 bytes collapsed, leaving you 17 bytes of whitespace. Cracked solution using the Concat whereas my intended solution used the Join, here's the intended solution: _=>string./**/ #if true Join(/*"* //*/""/**//*/"* /",#elseConcat(//*/, #endif from m in" "let p=$@"{@"  "[1]}"from i in(_.Replace(p,@"
"))where!new[]{p[0]^32^10}.Contains(i)select@i);


# MATL, 22 bytes. Cracked and cracked.

This is a program that takes input through STDIN and produces the output through STDOUT.

Code without spaces or newlines:

t'@*'dm1e5%Mdw%Y(


The input format is a little awkward because of how MATL takes string input. Strings with newlines cannot be entered directly through STDIN, because each input has to be a single line (newline marks the end of input). So the format is as follows:

1. A string is enclosed with single quotes. If the string content includes single quotes, they are escaped by duplicating. Example: 'I''m a string'

2. To enter a string with newlines one needs to split the string at newlines and concatenate everything (by means of square brackets), including numbers as ASCII codes. For example, consider the string formed by my first and last names with a newline in between. It would be entered as ['Luis' 10 'Mendo'].

This allows entering any other (possibly non-printable) ASCII codes. So the string in item 1 above could be alternatively entered as ['I' 39 'm ' 97 32 'string']. Check it here.

The only condition is that at least one of the parts within the brackets is a string. That forces any numbers to be interpreted as ASCII codes when concatenating.

Sorry about the awkward Good luck using this format!

## Original solution

t' @ *'dm1e 5%
Mdw%Y
(


Each % is a comment symbol, and so the rest of the line is ignored.

Spaces do nothing, but serve as separators. For example, 1e5, without the space, would be interpreted as the number 100000.

t takes the input and duplicates it.

' @ *' pushes that string, and d computes its consecutive differences, which gives [32 -32 10] (the -32 is useless).

m gives a logical row array indicating which characters are 32 or 10 (or -32).

1 followed by e reshapes as a row. This is no-op here.

5 followed by M pushes 1 again (last input to the most recent multiple-input function, which is e).

d computes consecutive differentes of 1, and so gives [] (empty array).

w swaps, and finally ( assigns [] to whitespace characters, i.e. removes them.

• You're lying! No way this works! (+1)... – Stewie Griffin Dec 16 '16 at 8:14
• cracked? – MickyT Dec 16 '16 at 19:09
• Crap... I didn't notice it was already cracked... Well, double cracked. – Stewie Griffin Dec 16 '16 at 19:26
• Nice work both of you! :-) Not exactly my intented solution but it works perfectly – Luis Mendo Dec 16 '16 at 19:29

# RProgN, 15 Bytes Cracked!

''R""R


You can toy with the code here. A relatively simple solution, hopefully the annoying nature of how RProgN handles strings will leave this uncracked.

## Original Program

' '  R
"
"  R


## Explination

Firstly, the input is implicitly pushed to the stack. Stack: <INPUT>

Then, we use ' ' to push a space to the stack. Stack: <INPUT> " "

the  actually tries to push a string represented by (WORD) but because there's whitespace after it, it just pushes an empty string. Stack: <INPUT> " " ""

The R here is sugar for the Replace command. Stack: <INPUTWITHOUTSPACES>

Next, the "NEWLINE" pushes a string containing a newline, which is nice because RProgN doesn't use escapes, it just straight up lets you push a string like that. Stack <INPUTWOSPACES> "\n"

Then, we use the  trick again, and Replace, which gives our output.

• Is this supposed to work in firefox? – Conor O'Brien Dec 14 '16 at 22:20
• I'm running it in firefox, is there an issue? Can you get a screenshot? – ATaco Dec 14 '16 at 22:21
• cracked? – MickyT Dec 14 '16 at 22:31
• Well that was fast. I nearly lasted half an hour! – ATaco Dec 14 '16 at 22:34

# Ruby, 86 bytes + 1 flag = 87 (cracked by Dom Hastings)

Requires command-line flag -p.

eval"(T$}{(!//;:678?32.&&)".gsub(/|(.)/){$1&&$&.ord.^($'.count('')).chr}


The code is actually valid in this form, it's just a no-op.

• This is awesome, I love it! So mean... – Dom Hastings Dec 15 '16 at 8:54
• Cracked! – Dom Hastings Dec 15 '16 at 10:38

# Beam, 72 bytes, Safe!

Now for a 2d language. Can be played with on TIO Nexus.

s'''>+++)+Ssn\
nsS+(+++</
>rgn\
^ @<(\
H         <
^    /


A fairly straight forward program without a lot in there to try and fool people.

s'''>+++)+Ssn\ # Sets the memory slot 0 to 0, 10 to 10 and 32 to 32. n will redirect down
nsS+(+++</  # since memory != store. \ is a red herring and not hit.
>rgn\           # read in from input and set store to memory value. For all characters
^ @<(\          # other than space, LF and end of input this will be different and n will
H         < # redirect down then through to the print and back to read. Space, LF and
^    /          # end of input get directed to the ( which tests for 0. This will redirect
# space and LF to path back to read, otherwise it will skip over and halt

• I think I'll move the interpreter to Node when I have time so Dennis can add it to TIO... – ETHproductions Dec 14 '16 at 23:44
• I've created a Node clone of the interpreter, and Dennis has now added it to TIO! – ETHproductions Dec 15 '16 at 4:06

# Labyrinth, 127 bytes

);""{"".@"-;,""""":"##"*"(:"+":}-;{";;"*#{:;"#""+("-;"";;"})"";""""""""


Hopefully I did this right :) this is my first cops and robbers entry.

## Original Code

 ) ;""{"".@
"-;, "" ""
"  :
" ##
" *
" (:
"  +
"  :}-;{
"    ; ;
" *#{: ;
" #    "
" +("-;"
"    ; ;
"    })"
"      ;
""""""""


# Java, 3241 + 28 Bytes for a big Integer import

This entry is solely to prove the possibility of a purely cryptographically secure entry. I believe this is within the rules, but if it is against the spirit, please let me know and I will delete out of fairness. I will leave this "unsafe" indefinitely until such a time when (and if) a crack gets found. This is a monstrosity and could surely be further optimized, but here it is.

interfacer{staticvoidmain(String[]A){Strings=",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",q=",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,",a="",b="";for(Stringt:s.split(",")){a+=t.length();}for(Stringt:q.split(",")){b+=t.length();}if((newBigInteger(a).multiply(newBigInteger(b)).toString()).equals("3649760552772806991406184564114682549877113954361462782925976763675666255653486225665808494957477900238166874367635068317805381406282572366371821972593595701388544127398102379288357379612333197280663769935384647844344358594407966485992727383589962048236726744715096711312156760311643104858212670342667229690568585229658813910569607411855770280546861422837629553847973043531578541545436967345783407835402474562087790816775240815912495599135241317")){System.out.println(A[0].replaceAll("","").replaceAll("\n",""));}}}


Out of fairness to robbers, here is it with all the "obvious" whitespace added.

interface r {

static void main(String[] A) {
String s = ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,", q = ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,", a = "", b = "";
for (String t : s.split(",")) {
a += t.length();
}
for (String t : q.split(",")) {
b += t.length();
}
if ((new BigInteger(a).multiply(new BigInteger(b)).toString()).equals("3649760552772806991406184564114682549877113954361462782925976763675666255653486225665808494957477900238166874367635068317805381406282572366371821972593595701388544127398102379288357379612333197280663769935384647844344358594407966485992727383589962048236726744715096711312156760311643104858212670342667229690568585229658813910569607411855770280546861422837629553847973043531578541545436967345783407835402474562087790816775240815912495599135241317")) {
System.out.println(A[0].replaceAll("", "").replaceAll("\n", ""));
}
}
}


Good luck, I would love to see this cracked. In fact I will even institute an unlimited bounty on this. If at any point you do crack this, you will be awarded 500 rep infinite accolade on stack exchange (as well as likely a wonderful mathetatical paper).

• Your solution and mine will likely walk down the ages uncracked. – Joshua Dec 22 '16 at 23:33
• To the downvoter, is there something illegitimate about this submision? – Rohan Jhunjhunwala Dec 24 '16 at 13:53
• There is actually a trivial solution for this (that does not involve factoring an RSA-440 number equivalent), unfortunately it requires an extra ~10,000 bytes... – SLuck49 Jan 3 '17 at 13:54
• @SLuck49 can you comment it to me? – Rohan Jhunjhunwala Jan 3 '17 at 15:26
• @SLuck49 wow! I just realized what you were looking at! I almost lost 500 reputation. – Rohan Jhunjhunwala Jan 3 '17 at 15:28

# C, 140 bytes, cracked by Riley

#include<stdio.h>intmain(){inta=getchar();while(a!=EOF){//\a=getchar();if(a!=10&&a!=32)//\\putchar(a^10^32);putchar(a);a=getchar();}}


(I hope I'm doing this right.)

• Cracked. Not the indended solution as I have 1 less byte. – Riley Dec 14 '16 at 20:16
• @Riley add an extra newline on the end and you'll be fine ;) – Alfie Goodacre Dec 14 '16 at 22:03

# Befunge 98, 65 bytes, cracked by Pietu1998

~v>#@>::':'0--\'[';--!8v1+!*1+j!j,v>#@


# Original program

~v           >#@
>::':'0--\'[';--!8v1+!
*1+j !j,     v     >
#@


# V, 37 bytes Cracked by nmjcman101

OVrS200@"kIi|D@"Aüî|D@"

Since this has unprintables, here is the readable version:

O<esc>Vr<C-a>S200<esc>@"kIi<C-v><C-v><esc>|D@"<esc>Aüî<esc>|D@"


Or if you prefer, a hexdump:

00000000: 4f1b 5672 0153 3230 301b 4022 6b49 6916  O.Vr.S200.@"kIi.
00000010: 161b 7c44 4022 1b41 fcee 1b7c 4440 22    ..|D@".A...|D@"

• Cracked That was a really cool puzzle – nmjcman101 Dec 15 '16 at 14:45

# Minkolang v0.15, 88 bytes, Cracked!

$oI[dd""=$r'10'=1J,?1R]r$O3.14$$Cdollars>$$$Ceverywhere>x


Try it online!

• cracked? – MickyT Dec 18 '16 at 21:48

## JavaScript ES6, 380 bytes, safe

This is the kind of entry that I was initially planning to release. It's huge and has nearly no chance to win, but I think it should be cryptographically strong enough to withstand 7 days. Now, I may be proven wrong!

67 bytes of whitespace to add.

s=>{for(k=|||.split|.map(s=>s.replace(/\s/g,c=>(k-=(c<'')+1,n=n<<2|k&3),k=n=0)&&n),x=10106050295,y=-4955405499,i=32,d=2654435769,t=d*i;i--;y-=(x<<4^x>>>5)+x^t+k[t>>>11&3],t-=d,x-=(y<<4^y>>>5)+y^t+k[t&3]);returns[atob(([x,y].map(n=>String.fromCharCode(n&255,n>>8&255,n>>16&255,n>>24)).join))](/[\n]/).join}


### Solution

This is an implementation of the Extended Tiny Encryption Algorithm. The 64-bit whitespace-encoded key expands to the following 128-bit key:

K = [0xd224de37, 0x89e34e79, 0xe34e7748, 0x939e2789]


Source: Wikipedia

Once decrypted and converted to ASCII, the 64-bit block [x, y] reads as c3BsaXQ=, which is the Base64 encoded representation of split.

let f =

s=>{for(k=

|

|

|

.split|.map(s=>s.replace(/\s/g,c=>(k-=(c<' ')+1,n=n<<2|k&3),k=n=0)&&n),x=10106050295,y=-4955405499,i=32,d=2654435769,t=d*i;i--;y-=(x<<4^x>>>5)+x^t+k[t>>>11&3],t-=d,x-=(y<<4^y>>>5)+y^t+k[t&3]);return s[atob(([x,y].map(n=>String.fromCharCode(n&255,n>>8&255,n>>16&255,n>>24)).join))](/[ \n]/).join}

console.log(f(H e l l o
W o r l d))

• I started brute forcing this thinking maybe I'll get lucky and you made each of the 4 key values have the same length (8 bits). Except it would be 16 bits each... woops. Brute force isn't going to happen, time for another approach. – SLuck49 Dec 20 '16 at 13:55

# Vitsy, 73 bytes, safe

This is downright evil.

5mW3m7m7m2mD&EPamX}<m15mEnl9mZD\[4m]^P-cm(D_2-3*bmD1-dmrnu-'


Good luck! 13 items of whitespace to add.

Original code:

5m
W3m7m
7m
2m
D&EPamX}
<m1
5mEn
l9mZ
D
\[4m]
^P-cm(D
_2-3*
bmD1-dmrnu-
'


Try it online!

This roughly simplifies down to:

<m1
W2\[2m]Z
l\[D&EP^P-_2-3*D1-rnu-(DX}]

• Please do not look at the edit history, as I had a bug in my code remaining. – Addison Crump Dec 15 '16 at 16:37
• You do not know evil. I know evil. – Joshua Dec 17 '16 at 3:11
• It is just past 0300 for me, so I'll add an explanation in the morning. – Addison Crump Jan 1 '17 at 3:09

## C#, 159 bytes, Cracked by milk

usingSystem.Linq;s=>string.Join("",string.Join("",s.Split(@"".Replace(newstring((char)0x0D,1),"").ToCharArray())).Select(c=>c+""!=""?c+"":"").ToArray());


153 collapsed so only 6 bytes of whitespace to find, shouldn't be too hard...

• Cracked – milk Dec 15 '16 at 19:05

# reticular, 43 bytes, cracked

ISBqv<>>4jE:d/v$v?c+91d/v?E;!?l$/o\$


The version on TIO is outdated, but you can get yourself a copy from the github.

• The version on Nexus was already up-to-date. I pulled on v1 as well. – Dennis Dec 15 '16 at 4:29
• Just checking, does this work if the input contains two consecutive linefeeds? – Martin Ender Dec 15 '16 at 10:22
• @MartinEnder it should. It depends on whether or not the input is piped or not. When piped it should read all of stdin. – Conor O'Brien Dec 15 '16 at 12:01
• @Dennis thanks! I meant to ask you in chat. – Conor O'Brien Dec 15 '16 at 12:01
• Cracked – James Holderness Dec 18 '16 at 4:13

# Wolfram, 132

Probably has more that one solution (hint: Mersenne)

StringReplace[#,""->"",Limit[x/(x-1),x->Boole[PrimeQ[
212821282128228281282128228821282128212821282-1]]]]&


Solution

StringReplace[#," "->"",Limit[x/(x-1),x->Boole[PrimeQ[
2 128 2 128 2 128 2 2 8 2 8 128 2 128 2 2 8 8 2 128 2 128 2 128 2 128 2-1]]]]&

• > Your submission will then be your source code with all whitespace removed – Cows quack Dec 17 '16 at 15:26
• @KritixiLithos It is removed – swish Dec 17 '16 at 15:27
• What about the spaces before the second line and the newline between the first and second line? – Cows quack Dec 17 '16 at 15:28
• Well, you're right, it is just for readability... – swish Dec 17 '16 at 15:29
• I think you can post the solution now. – CalculatorFeline May 6 '17 at 21:51

# Whitespace, 81 74 bytes

																					

ttttttttttttttttttttt (21 tab characters)


I know this is an old challenge but hopefully someone is willing to have a go at cracking this. I attempted to optimise for bytecount but it may be possible to make something shorter with the same number of tab characters.

# tcc, 850 bytes

To avoid pasting a very long line I passed this through tr -d '\n ' | fold -b -w 60.

#!/usr/bin/tcc-run#include<stdio.h>typedefunsignedcharu;um[]
={104,105,16,152,94,131,43,42,112,214,53,207,116,170,185,210
};intmain(){uS[256];uk[256];ui,j,t;intc,n=0;FILE*f;f=fopen(_
_FILE__,"r");/*cannotfail*/while(-1!=(c=fgetc(f)))if(c==''||
c==10)k[++n]=c;fclose(f);i=0;do{S[i]=i;}while(++i!=0);j=0;i=
0;do{j=j+S[i]+k[i%n];t=S[i];S[i]=S[j];S[j]=t;}while(++i!=0);
i=0;do{if(S[i]!=m[i])j=1;}while(++i<sizeof(m));if(j==1){i=0;
do{printf("%d,",(int)S[i]);}while(++i<sizeof(m));printf("\n"
);}else{while(-1!=(c=fgetc(stdin)))if(c!=''&&c!=10)fputc(c,s
tdout);}returnj;}

• Link to interpreter? – Addison Crump Dec 18 '16 at 21:50
• @VoteToClose: apt-get install tcc did it for me. – Joshua Dec 18 '16 at 21:52

# S.I.L.O.S, 159 bytes Safe!

loadLinedef:lblgetagetzzzz/za=256:aX=getax=Xy=Xz=xx-10x|ifxbGOTOx:by-32y|ifycGOTOx:cprintCharX:xa+1z+1x=getaifxa:b


Should be fairly trivial. It is my first cops and robbers entry.

No one attacked it, probably due to the esoteric nature of my own language. Seems like a sleazy way to slide by, but it doesn't really matter as shorter ones are safe.

loadLine
def : lbl geta get z zz
z/z
a=256
:a
X=get a
x=X
y=X
z=x
x-10
x |
if x b
GOTO x
:b
y-32
y|
if y c
GOTO x
:c
printChar X
:x
a+1
z+ 1
x=get  a
if x a
:b


Feel free to try it online