Illegal? What are you thinking about? No, of course not. I am student in Computer Science and will write my Bachelor Thesis about Bitcoin. I need to understand the technical background. Elliptic curve cryptography and the key generation mechanism in general. That means also for Altcoins.
Ok cool I understand! I can't help you with understanding how keys are created but I hope you will find what you are looking for.
Kind regards!