I’m cryptanalyzing a hash function I invented. I get a big amount of data which I want to return as a matrix
normalize(cd0a) normalize(cd0b)
normalize(cd1a) normalize(cd1b)
where the two rows represent using the three S-boxes in a different order and the two columns represent different plaintexts. Each normalize(cd)
is a 40-element vector (the number varies) of 255-element vectors of 256-element offset vectors (the number varies, if the whole thing has 44 elements then each innermost offset vector has 288 elements, etc.).
Here’s the end of my function:
end # of a for loop that computes all the data
([round1same0,round2same0,round1same1,round2same1]./(2*iters),
[normalize(cd0a) normalize(cd0b);normalize(cd1a) normalize(cd1b)])
#normalize(cd0a)
end
The commented-out line is for debugging; if I uncomment it, I get a 40-element vector. With it commented out, I get a tuple where the first element is a 4-element vector (and it’s correct) and the second element is not the expected 2×2 matrix of 40-element vectors but an 80×2 matrix of 255-element vectors (two 40-element vectors have been concatenated). How do I prevent concatenation and get a 2×2 matrix of vectors?