crypto: use less memory for storing keys
crypto: use less memory for storing keys

Use `BIO_new_mem_buf` where possible to reduce memory usage and
initialization costs.

dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node