way2cool4school
Posts: 1
Joined: Tue Jan 28, 2020 3:50 pm
Occupation: Student

How would I test this experiment?

Postby way2cool4school » Tue Jan 28, 2020 4:03 pm

I chose to do this project:
https://www.sciencebuddies.org/science- ... encryption

It's already too late to change the project and i'm not really sure how i'm going to test the experiment. I'm supposed to create a program that encrypts text in JavaScript and then try to crack the encryption, how would I determine which encryption was harder to crack? I can't test how fast it takes to decrypt because it'll always be 1 millisecond with a few lines of code.

bfinio
Expert
Posts: 435
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Science Buddies Staff

Re: How would I test this experiment?

Postby bfinio » Thu Jan 30, 2020 5:44 pm

Hi,

We have a few more detailed projects on the same topic here:

https://www.sciencebuddies.org/science- ... -be-hacked

https://www.sciencebuddies.org/science- ... er#summary

The first one uses Python instead of Javascript, and the second one does not specify a language but gives a more detailed procedure. Reading through those projects might help give you some ideas

I also think it's important to understand the importance between decrypting and "cracking" or "breaking" a code (caveat: I'm a mechanical engineer, not a computer scientist, so I might not have the language exactly correct). Decryption can be very fast if you know the "key" or algorithm used for encryption. It can take minutes, hours, days, or even years if you don't know the key and are trying to crack a complex algorithm. So your statement that "I can't test how fast it takes to decrypt because it'll always be 1 millisecond with a few lines of code." isn't necessarily correct, depending on what exactly you're trying to do.

As an analogy, think about it like opening a physical door if you have the key (very fast) vs trying to pick the lock if you don't. The latter can take a much longer time.

Hope that helps,

Ben


Return to “Grades 9-12: Math and Computer Science”