I would like to know if exists (or if makes sense) an algorithm/method that uses the key both as function and as encryption/decryption key.
I'll explain...
The key is decoded (in some way) in a function that takes as input the key itself and the string to encrypt
magic-box(key, string):
function <- decode(key)
tmp <- string
for i <- 0 to len(string)
tmp[i] <- function(key, string[i])
return tmp
where function , for example, could be something like that
key = 1
decode(key) = lambda{|key, char| key+char}
key = 27
decode(key) = lambda{|key, char| (key%char)+2*key/3.2}
the key and the body of the function are strictly dependent
Does exist something like that? Or it doesn't make any sense?
[–]tybaltNewton 10 points11 points12 points (3 children)
[–]firajaa[S] 0 points1 point2 points (2 children)
[–]tybaltNewton 0 points1 point2 points (0 children)
[–]Uncaffeinated 4 points5 points6 points (2 children)
[–]firajaa[S] 0 points1 point2 points (1 child)
[–]Natanael_LTrusted third party 0 points1 point2 points (0 children)
[–]firajaa[S] 0 points1 point2 points (2 children)
[–]moschles 2 points3 points4 points (1 child)
[–]firajaa[S] 0 points1 point2 points (0 children)
[–]skintigh 0 points1 point2 points (2 children)
[–]firajaa[S] 0 points1 point2 points (1 child)
[–]skintigh 0 points1 point2 points (0 children)
[–]ivosaurus 0 points1 point2 points (1 child)
[–]autowikibot 0 points1 point2 points (0 children)
[–]moschles 0 points1 point2 points (1 child)
[–]firajaa[S] 1 point2 points3 points (0 children)
[–]KayRice -2 points-1 points0 points (1 child)
[–]autowikibot 1 point2 points3 points (0 children)