ECC Encryption

Is there any information or library about Ecliptic Encryption within Kotlin?
For generating key pairs and encrypting, decrypting messages.
There is very little to non information about this topic.

I want to implement the ECDH 512 bit for example.
Is it maybe possible to use the Java version within Kotlin?
And how do we implement this?

Thanks in advance.

You probably can look at Bouncy Castle

Almost always

Like Java.
You can consider the Java to Kotlin converter.

You can use any java library as if it is written in kotlin.

Thank you for your reactions.
Is there any basic/beginner information about bouncy castle to implement this the right way in Android?
There is a ton of information, which I don’t mind.
But where to start?

This is what I have so far.

Security.insertProviderAt(BouncyCastleProvider(), 1)

val keyGen: KeyPairGenerator = KeyPairGenerator.getInstance("EC")
val random: SecureRandom = SecureRandom.getInstance("SHA1PRNG")
keyGen.initialize(256, random)

val pair: KeyPair = keyGen.generateKeyPair()

val privateKey: PrivateKey = pair.getPrivate()
val publicKey: PublicKey = pair.getPublic()

Do have I have to make a KeyAgreement first before I encrypt and decrypt messages?