I am currently studying the most widely known encryption algorithms and methodologies. For practice purposes, I am currently pursuing a project where I justwant to implement everything from ECB to RSA as some kind of a C crypto library.
I wanted to ask, how I How would I generate a more or less secure key in a C program (iI know, that writing a crypto library on my own is not secure at all but I just want to learn basic principles from key generating to key exchanging to encryption mechanisms).
So, howHow could I approach the problem of implementing an algorithm for a secure key generation? Which main issues need to be considered to reach an at least mediocre key security?