[CRYPTO] api: fix writting into unallocated memory in setkey_aligned