i need encrypt , decrypt urls in application.
encryption must bypass censorship. application uses rc4 no longer viable nowadays , there better alternative.
a algorithm should have following characteristics:
- the hash should short possible web filters block urls greater 75 characters. hash shorter 1 produced rc4 option.
- the algorithm should efficient both in terms of memory usage , cpu.
- the algorithm should stronger rc4.
- php & js implementation of algorithm should available.
you mentioned rc4 stream cipher. said, insecure. seems odd use stream cipher urls, if way want go, suggest @ salsa20. google using it, , there no patents on it.
if wanted go block cipher, aes 1 of compromises between security , speed. 2 of factors caused win aes competition -- adequate security , speed. prefer on salsa20 unless want stream cipher.
as keeping size down, both of above compact. aes, example, require 16 byte blocks , pad out multiple of 16. if have stay under 75 characters (and assuming 1 character per byte in encoding) have stay under 64 characters keep aes making block make 80 bytes.
i suggest compressing url first, encrypting. should able squeeze lot of data 72 bytes way. remember compress, encrypt. if encrypt first, cipher text pretty impervious compression.
Comments
Post a Comment