So as many of you may know, encryption isn't one of the easiest things in Scratch. And since my Chat.PY project has absolutely no security between Scratch and my server. Many of you may also know that very few things on the internet are secure as well. Many websites on the internet with a login system send the users' passwords from their browser to the web server insecurely (just as insecurely as any message sent in Mesh for those of you that want to compare security).
What I want to do with this collab, is try to get people together to create security and help them implement security in their projects and teach them to remember security in all their future projects. Mostly online projects, since there is almost no reason to implement security in normal Scratch projects.
A quote once said "Cook the blueberries in the muffins, don't add them after," where security could be considered the blueberries.
----
So I think the first goal is to make a simple encryption program in Scratch. Maybe a shift-cipher? Once we get a base made I think we should find a way to make it more efficient and faster.
We want all the ciphers to be easily implementable for any project that wants it. So we should keep it to a single sprite.
----
Examples:
Hashing: http://scratch.mit.edu/projects/Magnie/2276843
----
Competitions, make the fastest and most efficient cipher in Scratch!
Shift Cipher - Have it shift the letters to a different position based on the key provided by the user (the key can be just numbers, or it can use letters as part of the key).
Substitution Cipher - Have one letter replace another based on the key provided by the user.
Hashing - Create a one way encryption (hash). An example is provided here.
Rule: Keep the cipher script in a single sprite.
Feel free to collaborate or do it on your own! Currently there isn't any deadline. The official chat room for this is 'crypt' (no quotes) on Chat.PY. The official gallery is here.
----
Collaborative Projects:
Secure Mesh - Status:
Key Exchange [%33.3] (Phases: Find an algorithm, Script the algorithm, Test the script, Test it with a server, Polish it, Fully implement)
Symmetric Encryption [%0] (Phases: Find an algorithm, Script the algorithm, Test the script, Implement it with Key Exchange, Test with Server, Polish it, Fully implement)
Last edited by Magnie (2012-04-26 20:20:39)
Offline
Why do encryption in Scratch at all? For example, for chat.py, couldn't you just have your Python mirror make a secure connection to the server? That would seem to make a lot more sense practically; it'd be faster and probably more secure, too.
(Just ruining your fun here... )
Last edited by blob8108 (2012-04-20 03:32:15)
Offline
blob8108 wrote:
Why do encryption in Scratch at all? For example, for chat.py, couldn't you just have your Python mirror make a secure connection to the server? That would seem to make a lot more sense practically; it'd be faster and probably more secure, too.
(Just ruining your fun here... )
We could, but now Scratch Space (and soon FireMMO) supports direct-mesh. So there isn't much security.
Offline
bobbybee wrote:
blob8108 wrote:
Why do encryption in Scratch at all? For example, for chat.py, couldn't you just have your Python mirror make a secure connection to the server? That would seem to make a lot more sense practically; it'd be faster and probably more secure, too.
(Just ruining your fun here... )We could, but now Scratch Space (and soon FireMMO) supports direct-mesh. So there isn't much security.
Yeah, what you said.
It's easier to directly connect to Scratch Space with Mesh than to open Scratch, enable remote connections, open the Python program which then connects to Scratch and the server. Besides, just encrypting the passwords sent might be better than encrypting everything sent. Who knows.
Offline
Magnie wrote:
It's easier to directly connect to Scratch Space with Mesh than to open Scratch, enable remote connections, open the Python program which then connects to Scratch and the server. Besides, just encrypting the passwords sent might be better than encrypting everything sent. Who knows.
I thought you had to shift-click "R" to enable Mesh? Which is much more work than enabling remote sensor connections...
I see your point, though. Perhaps mod Scratch to create a secure Mesh? That would be cool...
Offline
blob8108 wrote:
Magnie wrote:
It's easier to directly connect to Scratch Space with Mesh than to open Scratch, enable remote connections, open the Python program which then connects to Scratch and the server. Besides, just encrypting the passwords sent might be better than encrypting everything sent. Who knows.
I thought you had to shift-click "R" to enable Mesh? Which is much more work than enabling remote sensor connections...
I see your point, though. Perhaps mod Scratch to create a secure Mesh? That would be cool...
Technically you only need to do it once. So it isn't that much work.
But the goal is to make Secure Mesh as portable as possible. Asking a user to download or mod code themselves beyond normal Mesh may be beyond their limits.
Last edited by Magnie (2012-04-20 14:13:09)
Offline
Magnie wrote:
Technically you only need to do it once. So it isn't that much work.
True, true...
But the goal is to make Secure Mesh as portable as possible. Asking a user to download or mod code themselves beyond normal Mesh may be beyond their limits.
I was thinking of a Flash/Java player mod with Mesh enabled, which could also have a secure (SSL?) option, too. I see your point, though; you do want it to be easy.
Your conclusion is correct, then! Cryptography in pure Scratch is indeed what you need. I'm sorry I interrupted — do carry on...
Offline
Magnie wrote:
blob8108 wrote:
Magnie wrote:
It's easier to directly connect to Scratch Space with Mesh than to open Scratch, enable remote connections, open the Python program which then connects to Scratch and the server. Besides, just encrypting the passwords sent might be better than encrypting everything sent. Who knows.
I thought you had to shift-click "R" to enable Mesh? Which is much more work than enabling remote sensor connections...
I see your point, though. Perhaps mod Scratch to create a secure Mesh? That would be cool...Technically you only need to do it once. So it isn't that much work.
But the goal is to make Secure Mesh as portable as possible. Asking a user to download or mod code themselves beyond normal Mesh may be beyond their limits.
Not beyond my limits. I'll download just about anything...
Offline
GeonoTRON2000 wrote:
Magnie wrote:
blob8108 wrote:
I thought you had to shift-click "R" to enable Mesh? Which is much more work than enabling remote sensor connections...
I see your point, though. Perhaps mod Scratch to create a secure Mesh? That would be cool...Technically you only need to do it once. So it isn't that much work.
But the goal is to make Secure Mesh as portable as possible. Asking a user to download or mod code themselves beyond normal Mesh may be beyond their limits.Not beyond my limits. I'll download just about anything...
But it's easier to modify something you already have downloaded than to download something made by another user (which could be potentially harmful), isn't it?
Offline
Magnie wrote:
GeonoTRON2000 wrote:
Magnie wrote:
Technically you only need to do it once. So it isn't that much work.
But the goal is to make Secure Mesh as portable as possible. Asking a user to download or mod code themselves beyond normal Mesh may be beyond their limits.Not beyond my limits. I'll download just about anything...
But it's easier to modify something you already have downloaded than to download something made by another user (which could be potentially harmful), isn't it?
Plus not everyone has the knowledge to do so.
Offline
bobbybee wrote:
Magnie wrote:
GeonoTRON2000 wrote:
Not beyond my limits. I'll download just about anything...But it's easier to modify something you already have downloaded than to download something made by another user (which could be potentially harmful), isn't it?
Plus not everyone has the knowledge to do so.
Or the ability. I know some people block downloading and stuff. But of course everything here is probably only going to be in Scratch, so squeak stuff other than Mesh probably.
Offline
Magnie wrote:
bobbybee wrote:
Magnie wrote:
But it's easier to modify something you already have downloaded than to download something made by another user (which could be potentially harmful), isn't it?Plus not everyone has the knowledge to do so.
Or the ability. I know some people block downloading and stuff. But of course everything here is probably only going to be in Scratch, so squeak stuff other than Mesh probably.
Let's get back on topic, shall we?
Offline
bobbybee wrote:
Magnie wrote:
bobbybee wrote:
Plus not everyone has the knowledge to do so.Or the ability. I know some people block downloading and stuff. But of course everything here is probably only going to be in Scratch, so squeak stuff other than Mesh probably.
Let's get back on topic, shall we?
Technically we are on topic since we are discussing how we could implement Secure Mesh.
Offline
Okay, so after reading a small bit about Key-Exchange Algorithms, I think the simplest way is with this method. We could create a script that repeats the method multiple times (8 for most efficient, but secure) and then convert the integers returned into letters.
I think the next step is creating a symmetric algorithm that can't be easily broken, but can still be used for a secure Mesh. Something people would be willing to transfer useful, but not important passwords over. Like a user account to a desktop computer that is only accessible by family and close friends.
Obviously a shift-cipher wouldn't be secure enough. So what ideas do you guys have?
Make sure to keep it to simple math algorithms like: Plain Text > letter'i * key'i > Cipher Text. i symbolizes which letter. So something like Letter 1 (or letter 'i') of "secret message".
Last edited by Magnie (2012-04-23 15:35:54)
Offline
Magnie wrote:
Okay, so after reading a small bit about Key-Exchange Algorithms, I think the simplest way is with this method. We could create a script that repeats the method multiple times (8 for most efficient, but secure) and then convert the integers returned into letters.
I think the next step is creating a symmetric algorithm that can't be easily broken, but can still be used for a secure Mesh. Something people would be willing to transfer useful, but not important passwords over. Like a user account to a desktop computer that is only accessible by family and close friends.
Obviously a shift-cipher wouldn't be secure enough. So what ideas do you guys have?
Make sure to keep it to simple math algorithms like: Plain Text > letter'i * key'i > Cipher Text. i symbolizes which letter. So something like Letter 1 (or letter 'i') of "secret message".
I've Made a ton of encrypt dlls in VB.NET, so you could use one of those if you want.
Contact me at nathansaint1@gmail.com
Offline
Nathanator1416J wrote:
Magnie wrote:
Okay, so after reading a small bit about Key-Exchange Algorithms, I think the simplest way is with this method. We could create a script that repeats the method multiple times (8 for most efficient, but secure) and then convert the integers returned into letters.
I think the next step is creating a symmetric algorithm that can't be easily broken, but can still be used for a secure Mesh. Something people would be willing to transfer useful, but not important passwords over. Like a user account to a desktop computer that is only accessible by family and close friends.
Obviously a shift-cipher wouldn't be secure enough. So what ideas do you guys have?
Make sure to keep it to simple math algorithms like: Plain Text > letter'i * key'i > Cipher Text. i symbolizes which letter. So something like Letter 1 (or letter 'i') of "secret message".I've Made a ton of encrypt dlls in VB.NET, so you could use one of those if you want.
Contact me at [removed]
I'm afraid we need a purely Scratch based encryption algorithm, but thanks anyways.
Offline
bobbybee wrote:
Magnie wrote:
bobbybee wrote:
Plus not everyone has the knowledge to do so.Or the ability. I know some people block downloading and stuff. But of course everything here is probably only going to be in Scratch, so squeak stuff other than Mesh probably.
Let's get back on topic, shall we?
O.K... I made a simple substitution cypher. It's not much, but it's here: http://scratch.mit.edu/projects/GeonoTRON2000/2493091
Offline
GeonoTRON2000 wrote:
bobbybee wrote:
Magnie wrote:
Or the ability. I know some people block downloading and stuff. But of course everything here is probably only going to be in Scratch, so squeak stuff other than Mesh probably.Let's get back on topic, shall we?
O.K... I made a simple substitution cypher. It's not much, but it's here: http://scratch.mit.edu/projects/GeonoTRON2000/2493091
Cool! Could you implement the encryption and decryption into a single project and upload that please?
Offline
Magnie wrote:
GeonoTRON2000 wrote:
bobbybee wrote:
Let's get back on topic, shall we?O.K... I made a simple substitution cypher. It's not much, but it's here: http://scratch.mit.edu/projects/GeonoTRON2000/2493091
Cool! Could you implement the encryption and decryption into a single project and upload that please?
Sure!
Here you go:
http://scratch.mit.edu/projects/GeonoTRON2000/2495455
Offline
GeonoTRON2000 wrote:
Magnie wrote:
GeonoTRON2000 wrote:
O.K... I made a simple substitution cypher. It's not much, but it's here: http://scratch.mit.edu/projects/GeonoTRON2000/2493091Cool! Could you implement the encryption and decryption into a single project and upload that please?
Sure!
Here you go:
http://scratch.mit.edu/projects/GeonoTRON2000/2495455
Thank you!
Offline
The problem in that project is that it's missing a key.
Offline
bobbybee wrote:
The problem in that project is that it's missing a key.
It's inside the project. The project notes say to change the number inside the project.
Offline
Yes, but it's impossible to safely transmit the toalpha variable. It just wouldn't work.
Offline
Today in study hall I was bored (not the first time ), and I decided to make a hash function that could be worked out on paper. I made a big table of letter to binary codes, and then concocted a hash function that works on the following principle:
Assuming the input is abcd:
a ^ b a ^ c a ^ d b ^ c b ^ d c ^ d
where ^ means the logical XOR action.
With the letter to binary chart, it takes only a couple minutes to compute the hash for a string of 4 characters, but it gets larger quickly.
Example wrote:
'jack' produces '110901021008'
Currently trying to make this in scratch.
Last edited by ohaiderstudios (2012-04-25 18:55:28)
Offline