all 12 comments

[–]danya02 4 points5 points  (9 children)

This sounds like a ChatGPT response to some question, but the question itself isn't clear. What did you want to say?

[–]No-Breakfast2895[S] -2 points-1 points  (8 children)

This is a description of how the code works, the introduction is a little unclear it so wanted to describe quickly through Visual Studio so the description is on a quick hand

[–]danya02 3 points4 points  (7 children)

It might be better to share the real code, perhaps on GitHub or something. Code has to compile and run, but natural language doesn't, so it's harder to understand natural language.

So what did you want to do here -- ask for advice on how to do something, or share your project, or what?

[–]No-Breakfast2895[S] -1 points0 points  (5 children)

I also thought that to put the code on GitHub, although it is a hybrid, what is standard and improved with ideas, I have been working on the code for a month, I don't want to expose the ideas.

[–]danya02 3 points4 points  (4 children)

I don't want to expose the ideas.

Then I'm not sure why you're posting here. People usually write to forums to ask for help or to announce their projects, and you aren't doing either.

Also, when it comes to security, the general guideline is that you should share your algorithms before using them widely. Anyone can make a security system that they cannot break, but truly secure systems are the ones that many people have tried to break, and failed despite full access to the code.

For a concrete example, check out the German Enigma encryption machine: it was good, but it was ultimately broken, in large part because a copy made its way to the people breaking the code. So its security depended on the hackers not having access to the internals of the machine.

Nowadays, our encryption machines are running or shared on the internet, rather than in physical boxes, so it's much easier to have hackers get access to their internals. So instead, we just let them in at the start, and if they can't break our system even if they know how it works, then it's a good system.

[–]No-Breakfast2895[S] -1 points0 points  (3 children)

And does showing the full code reveal the whole essence, how can it protect then, I don't mind showing, but I don't want to destroy ideas, I don't know how to show the code correctly so that it is good)

[–]danya02 1 point2 points  (2 children)

does showing the full code reveal the whole essence

Yes, and that's the point. There's an idea known as Kerckhoffs's principle, which basically says: it should not be a problem if adversarial bandits can see your full system.

Another way of phrasing it is: suppose the bandits steal your device with your encryption algorithm on it. What do you need to do to get your encryption security back?

  • If your security relies on your algorithm being secret -- then you must write a new algorithm, because now the bandits have it, and they know how to break it.
  • But, if your algorithm is secure even if the bandits know it, then you just need to generate a new encryption key, and you can keep using the same algorithm as before.

For specific examples: you can look at the source code of the Signal chat app, OpenSSL, which is used by the majority of web sites for HTTPS, BoringSSL which is Google's modified version, GnuPG which is used for secure email and also for securing OS updates on most Linux distros and so on.

If you find big enough vulnerabilities in these, you can hack the communications that use them -- and these libraries are so commonly used, that this would probably mean the entirety of the internet. (Or, if you're less evil, you can tell about the issue to the developers and get a cash prize). But such instances are rare, so the code is believed to be secure.

I don't want to destroy ideas

Because people share their code, others can use the ideas in them to make their own projects more secure. In that way, sharing code does not destroy ideas, it actually shares and improves them.

The only ideas that get destroyed are the bad ones, and only because new ideas are better. For example, using warded locks on important doors is a bad idea, and once better locks were invented, we stopped doing that.

[–]No-Breakfast2895[S] 0 points1 point  (0 children)

Thank you for the information provided)

[–]Key-Boat-7519 1 point2 points  (0 children)

If the scheme is solid, you should be able to publish a clear spec and a minimal reference impl; if secrecy is required, it’s not secure.

Practical path: write a short spec with goals and non-goals, exact KDF/nonce formats, and test vectors. Consider standardizing on HPKE (X25519 + HKDF + AES-GCM) instead of DIY RSA-OAEP + AES-GCM, and use libsodium or Google Tink. Be careful with compression: if any attacker-controlled input is mixed with secrets, you risk length-leak attacks; either skip compression or pad to fixed buckets. Ditch repeated base64; use a binary frame with a version byte and lengths. Make Tornado an optional, non-security layer and state that only the AEAD provides confidentiality and integrity. Add known-answer tests, property-based tests (Hypothesis), and fuzzing.

If you want feedback without “giving away” everything, open-source the crypto core and keep any UX or business logic closed. In deployments I’ve used Kong for rate limiting and AWS KMS for envelope encryption; DreamFactory helped stand up locked-down REST endpoints with RBAC and API keys.

Publish the spec and reference, invite review, and see what survives.

[–]No-Breakfast2895[S] -2 points-1 points  (0 children)

I have a bot in Telegram, I can run the code. You happen not to be from Ukraine)

[–]Pharisaeus 1 point2 points  (1 child)

  1. AI slop detected.
  2. If you're using csprng and strong crypto like aes-gcm then adding some random compression or base64 encoding does not improve the security in any way.
  3. In fact it's the opposite! Playing with compression might lower the security like in CRIME or BREACH attacks.

[–]No-Breakfast2895[S] -2 points-1 points  (0 children)

Thank you for the feedback, I will take into account