Reputation: 11
For example in python if I’m sending data through sockets could I make my own encryption algorithm to encrypt that data? Would it be unbreakable since only I know how it works?
Upvotes: 0
Views: 59
Reputation: 867
Yes you can. Would it be unbreakable? No. This is called security through obscurity. You're relying on the fact that nobody knows how it works. But can you really rely on that?
Someone is going to receive the data, and they'll have to decrypt it. The code must run on their machine for that to happen. If they have the code, they know how it works. Well, at least anyone with a lot of spare time and nothing else to do can easily reverse engineer it, and there goes your obscurity.
Is it feasable to make your own algorithm? Sure. A bit of XOR here, a bit of shuffling there... eventually you'll have an encryption algorithm. It probably wouldn't be a good one but it would do the job, at least until someone tries to break it, then it probably wouldn't last a day.
Does Python care? Do sockets care? No. You can do whatever you want with the data. It's just bits after all, what they mean is up to you.
Are you a cryptographer? No, otherwise you wouldn't be here asking this. So should you do it? No.
Upvotes: 1