I want to find an crypt algorithm which provides the functionality described below.
Given a key (a vector Vkey) and a data (an image), use this key to encry the image; the encrypted image can not be identified afetr encrypt.
When decrypt, if:
- use a key = Vkey to decrypt, the decoded image is the same as original one without error.
- use a key = Vkey_1, and diff(Vkey, Vkey_1) < threashold, the decoded image has slightly diffence (ex, for each pixel 1~5 difference) with original.
- use a key = Vkey_2 which is much unlike Vkey (diff(Vkey, Vkey_1) > threashold), the decoded image is far from clear as orignal.
In short, diff(Vkey, Vkey_try) is Proportional to diff(original, decrypted image).
Some crypt algorithm requests that the decrypt key should be exactly the same as the key but here, we need "if not completely match but only slightly different, we still can decode but with a little artifact".
Is there any similiar en(de)crypt algorithm which provides the requested functionality?