While programming questions are very certainly off-topic for Crypto.SE, very frequently programmers would hurt themselves by misusing (or sometimes abusing) cryptographic algorithms. This meta post is a proposal and a request for comment on how the site can help programmers resist questionable programming practices.

For example, too often programmers want to apply encryption to their application data, and end up using some well-known blockcipher(s) in ECB mode and forget to add MAC to the ciphertext. This kind problem can be easily avoided, if library developers are willing to actively expose high-level functionalities, and application developers are consciously avoiding creating low-level constructs.

Currently, I have the following ideas:

  1. Populate (or bump up some existing ones) on the site some quality Q&As about the correct usage of cryptographic primitives, the inter-dependency and relationship between their functionality, and their expected interface.

  2. Populate (or bump up some existing ones) on the site some quality Q&As about development of misuse-resistant schemes, such as deterministic ECDSA, AES-GCM-SIV, etc.

Update 1

For example, this question asked relationship between TRNG and PRNG. Had it been tagged with "programming-interface", one would point out to him that PRNG APIs may provide entry point for seeding, where as TRNG only have entry points for reading as it's already the entropy source.

Years after this question abused an XOF as a stream cipher, this answer finally clarified what are Hash, XOF, and stream cipher. These primitives have different APIs and security goals and properties, and questions like these would make a perfect opportunity for the tag "programming-interface" to explain their intended usage.

The tag "misuse-resistant" is a new tag I created. It's interesting to see that this tag hadn't existed before. This is a discipline encompasses both algorithm/scheme design, and application development, while I have little idea on how it may be used, I find information like this lacking prevalence.

The difference from the "cryptography" tag on SO, would be that on SO, they ask how to do what they want, where as here, the tags ask how to successfully achieve these goals (and what goals must be achieved).

  • Many of these questions come from newcomers. Although programming-interface may be found, I don't think that misuse-resistant will be, so this requires active participation of the lead answerers. – Maarten Bodewes Feb 28 at 10:06

You must log in to answer this question.

Browse other questions tagged .