Any way to generate a cryptographically secure random prime?

I'm trying to get started on making an app that must sign messages to and from a BLE device.

I'm a beginner in this space, but my understanding is that I must first generate a private key, which involves generating a large random prime in a manner that is cryptographically secure. Since I believe that Garmin does not have any libraries for cryptography, I would assume that I need to implement this myself.

Does Monkey C have any built-in way to do generate numbers securely? I've read that Math.rand() is not very secure.