Hacker News new | ask | show | jobs
Unique Encryption Algorithm in Python (github.com)
1 points by kronxe 1897 days ago
2 comments

It is not a cryptographic algorithm given no key nor nonce. it is an obfuscation function that can only hide some obvious patterns (it can be still useful, but not in a cryptographic way). I want to give you a benefit of doubt, but a "cryptography" tag makes me nervous enough. Also it seems that there is no justification why such a complex approach is required; the typical approach is to use typical symmetric encryption algorithms with fixed key and nonce.
In computer science, cryptography refers to secure information and communication techniques derived from mathematical concepts and a set of rule-based calculations called algorithms, to transform messages in ways that are hard to decipher. [https://searchsecurity.techtarget.com/definition/cryptograph...] Basically cryptography means secure plaintext replaced with it by some other thing and you should be able to make inverse replacation proccess as well (decryption) this function should be based on mathematical theories or methods.

I think you are not familiar with the cryptography concepts in general trends because today the most of data breaches become dangerous if the encrpyted part decrypts by the hackers, so that is why we should avoid typical approaches.

Also, your question about complexity, I am sorry but I can not understand. If you have an important data, you should protect it by an well-developed algorithm.

> Basically cryptography means secure plaintext replaced with it by some other thing and you should be able to make inverse replacation proccess as well (decryption) this function should be based on mathematical theories or methods.

Under your definition cryptographic hash algorithms [1] and digital signatures [2] are not cryptographic.

> I think you are not familiar with the cryptography concepts in general trends because today the most of data breaches become dangerous if the encrpyted part decrypts by the hackers, so that is why we should avoid typical approaches.

Your claim suggests that you are not familiar with cryptography at all. Modern cryptographic algorithms are parameterized with keys in a way that knowing the algorithm doesn't give adversaries much hint---you just have to keep keys safe. By comparison knowing that your algorithm is in use allows the complete decryption. This is...

> If you have an important data, you should protect it by an well-developed algorithm.

...what I referred by a "complex" approach. Existing algorithms are complex by themselves, but have well-defined interfaces and guarantees that you don't have to care about its innards. But rolling your own crypto means you have to care about its innards, thus more complex.

[1] https://en.wikipedia.org/wiki/Cryptographic_hash_function

[2] https://en.wikipedia.org/wiki/Digital_signature

Basically hash functions are not reversible that is why we call them as cryptographic hash function and my algorithm is cryptographic encryption function (which has a reverse). Also digital signature has a math behind I could not understand what the problem is here. [1]

> Your claim suggests that you are not familiar with cryptography at all. Modern cryptographic algorithms are parameterized with keys in a way that knowing the algorithm doesn't give adversaries much hint---you just have to keep keys safe. By comparison knowing that your algorithm is in use allows the complete decryption.

Have you got an experience in data encryption for databases or related ? My point is your function may used by other people, for example: If a hacker reached db of website, and tried to find the keys of encryption. He can make brute force trial to accomplish it or some analysis. There is lots of field that used cryptography like e2e encryption in communication applications or cryp. hash functions like md5 in databases. This field is very broad, it does not focus on just one subject.

[1] https://miro.medium.com/max/1272/1*sc0fhLXdwc2WRzGRDAfkcQ.pn...

> Have you got an experience in data encryption for databases or related ?

Yes, I worked on online game servers, encrypted protocols and of course encrypted databases (required by the law). There were no keys stored in the database nor in our code, we had a dedicated encryption server that holds them. (Nowadays we would use AWS KMS or similar services.) Our keys were far longer than what is brute-forcable as well. In fact if something is brute forcable your response should be increasing key length (at the very least 128 bits or more), not changing algorithms to some obscure home-made one.

I see and I understand your point but I want to say the cllasical approaches are more stable but more unsafe. By the way, there is no something that non brute-forcable today, increasing proccesing power and quantum computing allows it. I think we look some different specific fields. 'Home-made' algorithms certainly gives much more safety because people cannot attack if they dont know how it works. For example, in my algorithm I used ideas of prime numbers and also changing the order of the characters but maybe some other people use turn bytes into bcd values and than make some change for complexity. My algorithm is one of the example of trying to use some other method different than standard encryption with key.
A video explanation (in Turkish): https://www.youtube.com/watch?v=xAfyjI8hT8w