RSA crypto.generate_key(...) -- the format of the output

I do this:

 :crypto.generate_key(:rsa, {0x800, 3})

it generates public and private keys:

{[
   <<3>>,
   <<227, 130, 120, 58, 123, 217, 97, 249, 99, 80, 170, 72, 21, 89, 149, 247,
     179, 77, 213, 235, 187, 243, 218, 213, 102, 61, 167, 39, 202, 108, 199,
     232, 221, 192, 40, 19, 151, 50, 195, 216, 183, 91, 151, 67, 208, 254, 8,
     ...>>
 ],
 [
   <<3>>,
   <<227, 130, 120, 58, 123, 217, 97, 249, 99, 80, 170, 72, 21, 89, 149, 247,
     179, 77, 213, 235, 187, 243, 218, 213, 102, 61, 167, 39, 202, 108, 199,
     232, 221, 192, 40, 19, 151, 50, 195, 216, 183, 91, 151, 67, 208, 254,
     ...>>,
   <<151, 172, 80, 38, 253, 59, 150, 166, 66, 53, 198, 218, 184, 230, 99, 250,
     119, 137, 57, 71, 210, 162, 145, 227, 153, 126, 111, 111, 220, 72, 133, 69,
     233, 42, 197, 98, 100, 204, 130, 144, 122, 61, 15, 130, 139, ...>>,
   <<251, 165, 146, 221, 224, 76, 108, 5, 11, 243, 239, 55, 140, 173, 104, 120,
     39, 152, 6, 227, 170, 141, 42, 53, 93, 63, 5, 45, 186, 117, 5, 17, 154,
     116, 166, 183, 219, 224, 219, 109, 233, 235, 185, 223, ...>>,
   <<231, 114, 0, 253, 45, 203, 193, 95, 100, 239, 206, 88, 182, 243, 245, 130,
     31, 76, 138, 239, 247, 225, 78, 90, 79, 72, 67, 189, 252, 111, 208, 142,
     61, 227, 146, 134, 227, 209, 218, 121, 2, 247, 64, ...>>,
   <<167, 195, 183, 62, 149, 136, 72, 3, 93, 77, 74, 37, 8, 115, 154, 250, 197,
     16, 4, 151, 199, 8, 198, 206, 62, 42, 3, 115, 209, 163, 88, 182, 102, 248,
     111, 37, 61, 64, 146, 73, 70, 157, ...>>,
   <<154, 76, 0, 168, 201, 50, 128, 234, 67, 74, 137, 144, 121, 247, 249, 1,
     106, 51, 7, 74, 165, 64, 222, 230, 223, 133, 130, 126, 168, 74, 139, 9,
     126, 151, 183, 4, 151, 225, 60, 80, 172, ...>>,
   <<32, 148, 36, 245, 163, 200, 190, 8, 43, 3, 0, 52, 85, 228, 44, 214, 141,
     242, 169, 24, 243, 75, 122, 39, 232, 23, 82, 240, 218, 235, 67, 176, 133,
     170, 28, 145, 2, 220, 244, 106, ...>>
 ]}

In what format are those keys? Meaning, not Elrang or Elixir format which is a binary string, but crypto format.

The <<3>> was in the original function call - that’s clear. The public key part in the 1st element of the result - clear too.

How about the 2nd element being private key – why are there 6 elements in it? What are those and what for?
Where is the private key itself – the very value?
And what’s that format called?

https://erlang.org/doc/man/crypto.html#generate_key-2 --> doesn’t give the answers

In format described in rsa_params/0.

It does give the answers,but you’ll have to learn how to read the erlang document formatting. Notice that the function call is annotated with the typespec of the function and it has a hyperlink to the relevant type definition.

If you’re looking to convert it to something else, you may want to consult the public_key module which has some conversion functions.