I am trying to learn more about Crystals Kyber. I am playing around with a Java implementation. I am only focussing on Kyber-512 for now, I have locally changed the source code in order to remove the DER PKCS8/X.509 encodings so my public/private keys are simple byte arrays instead of objects, which I succeeded. Everything is still compiling and I can successfully share a secret.
Inside this implementations KyberPrivateKey.java and KyberPublicKey.java classes are 2 large variables p and g, called "prime modulus and base generator", which in his implementation example always seems to be a default value (which is defined in the file KyberParams.java).
I do not understand what this p and g are, I cannot find a reference in their specification about such large prime modulus and base generator. It seems it is only used in this PKCS8/X.509 encodings and seem to work fine without any reference to those variables.
Am I not understanding this correctly? Could someone explain me what those variables are and why they seem not necessary?