FirebirdSQL logo

RSA_PRIVATE Examples

select rdb$set_context('USER_SESSION', 'private_key', rsa_private(256))
  from rdb$database;
Warning

Putting private keys in the context variables is not secure;we’re doing it here for demonstration purposes.SYSDBA and users with the role RDB$ADMIN or the system privilege MONITOR_ANY_ATTACHMENT can see all context variables from all attachments.

RSA_PUBLIC()

Generates an RSA public key

Result type

VARBINARY

Syntax
RSA_PUBLIC (private_key)
Table 1. RSA_PUBLIC Function Parameters
Parameter Description

private_key

RSA private key in PKCS#1 format

RSA_PUBLIC returns the RSA public key in PKCS#1 format for the provided RSA private key (also PKCS#1 format).