Tricky Encryption Algorithm Design [closed] - algorithm

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Bob and Alice each have a bit string they want to keep private. They each want to know what the logical AND of their two bit strings would be without telling the other or anyone else their actual bit strings... how can they do this? Keep in mind that even once they both hold the AND of their two bit strings, they should still not be able to calculate the other person's string exactly (unless of course one of their strings was all 1s).
I know that I have seen something similar before in some sort of key system/voting system but I couldn't remember the details. It has to be something like make a private random key, xor it and use that somehow... but I couldn't work out the details. Any clever encryption people out there?

I think that you are looking for homomorphic encryption systems, in which it's possible to do computation on encrypted values without ever exposing what those encrypted values are. This encompasses a far more general set of problems than simply computing bitwise AND.
Hope this helps!

Related

String manipulation using MD5 in rails 3 [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have a big string
approx 4000 characters
i want encrypt and decypt it using MD5 because of i want to do convert in a small string please help me a lot of finding i found Base64 but it is not our solution please any one help me
my_string="abcdefghhhhhhhhhhhhhhhhhhhhhh"
Base64.encode64(my_string)
it gives us very lengthy string.
Encrypting a string will not make it smaller, it will at best be the same length. I think what you are looking for is a way to compress your string. That aside, MD5 is a one-way hashing algorithm, that means that it is designed, so there is now way of recovering the source string (it turns out that it was designed rather poorly).
MD5 is a one-way hash, you can't decrypt it.
To encode a string use Digest::MD5.hexdigest('foobar') but for most purposes I'd say use a better hashing algorithm; MD5 has been broken for a long time.

How to start reverse engineering a algorithm by key [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I have a set of keys e.g (IENDKCAGI, RZRLBYBFH) and now I want to find the algorithm of it. I allready know the basics of cryptography but I don't know how to start reverse engeneering the algorithm.
I don't search a certain algorithm, I'm just interested how the process would look like.
cheers
EDIT: I don't want to crack any key!!! I buy the software I need!
I'm just interested in the approach of reengeneering a checksum from the result, thats my conceptual formulation, without knowing the algorythm. This topic is more theorethical, but in my opinion it has a certain relevancy also for stackoverflow
You can analyze it to some degree, at least enough to rule out several possibilities. You say you have a set of keys, and I'm not sure what you mean by that, so pretend for discussion that the left value is the plaintext and the right value is the encrypted equivalent.
You can determine that the left value has only one repeating character, "I", and that the right value has two, "R" and "B". From that you can rule out a simple substitution cipher, even one with characters rearranged.
Both values appear to have only characters in the range [A-Z] (a larger sample would help confirm), so you can rule out encryption techniques that yield binary results, like most block and stream ciphers. In fact, use of such a limited character set implies that it was designed for use by people rather than machines. That would imply a relatively simple cipher technique, but may also involve an additional key to which you do not have access.

When designing an encryption algorithm what are the key factors that determine what the algorithm would do? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm looking into a little project of designing my own symmetric crypt algorithm. It will be for mainly file encryption.
What is the design process for such a project?
First lesson - don't.
Second lesson - learn cryptanalysis. If you aren't aware of how crypto schemes are already being broken, how will you assess how "strong" or "weak" your own algorithms are.
The self study paper I linked to above is aging a bit however. There are newer attacks (such as the recent bi-clique attack against AES) which won't be covered there.
There's also a fledgling crypto stack exchange site, which may be a better place to ask questions, if you actually intend to study crypto seriously (rather than "I've invented the best crypto system ever, nobody will ever be able to crack it").
Build an algorithm that is resistant to...
Known plain-text attacks: http://en.wikipedia.org/wiki/Known-plaintext_attack
Chosen plain-text attacks: http://en.wikipedia.org/wiki/Chosen_plaintext_attack
Differential cryptoanalysis: http://en.wikipedia.org/wiki/Differential_cryptanalysis
Linear cryptoanalysis: http://en.wikipedia.org/wiki/Linear_cryptanalysis
My specific suggestion is that you start with a cryptographically secure random number generator (http://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator), seed said generator with your symmetric encryption key and work from there avoiding the attack vectors above.

CSI style zoom in and enhance now possible? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
I have always thought the way they zoom in and enhance on TV and movies was strictly impossible. Essentially because you cannot create more information that there is to begin with.
There were ways to get better looking or clearer images like with re-sampling, but never to the extent seen on film.
Now, it seems that is not true.
I was reading this article, and it seems they have a way to do that now?
Or, is this just a better version of what was already possible? You still need to have a fairly clear image to start with? Otherwise, what are the limits of this technique?
There is something called Super-resolution. Some companies claim to use fractal theory to enhance images when they are upscaled. But, what you see in most movies is just fiction.
Image enhancement always involves pixel interpolation (aka. prediction) - in one way or the other. Interpolation can be good, bad or whatever, but it will never out-perform real pixel which was recorded by imaging device at greater resolution.

How much flexibility do you allow users creating uids? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
After having to register at one more website, and hitting stupid restrictions on the Username (no spaces or special characters), I'm wondering why we still have programmers restricting things like that.
Is there a concensus on the methodology of allowable usernames?
Often it's based on technology restrictions. For example, if your UIDs are going into a database, they have to be sanitized. Rather than try to catch all possible exploits or problematic values, many developers choose to restrict their UIDs to alphanumeric characters.
Also, when integrating with legacy systems, sometimes there are limitations already in place - perhaps the "username" field is only 6 or 8 characters long.
Ultimately, there's usually not a good engineering design reason for doing this, since a username should not be used in any meaningful calculations, but there are often good business reasons for doing so.

Resources