Disclaimer: This post was written entirely with GPT-4 model
Version: 0.1
Greetings,
The absence of an RSA library in B4i, particularly for generating RSA key pairs and adjusting encryption key size, has been a personal challenge for me. Despite not being well-versed in Objective C, I was...
This example replaces my previous examples with cleaner inline C coding (I'm getting better :-))using almost all variables from Globals. You can define the keysizes (eg. 2048 or 4096). It's fully compatible with all plattforms (B4x, PHP, OpenSSL, etc.). The ESP's use mbdtls which is included...
Here's an updated example how to
- generate an RSA keypair (Public and Private key) on a ESP32 and on B4x
- export these keys in PEM format (compatible with any other plattform like B4x, .net, php, python, etc.)
- exchange the Public Keys (here via WiFi/AsyncStreams)
- encrypt and decrypt on...
Sometimes it makes sense to generate pricat/public key pairs for clients on the server side by code. Here's an example how to do this in php (OpenSSL must be installed as it usually is):
$keys = openssl_pkey_new(array("private_key_bits" => $4096,"private_key_type" => OPENSSL_KEYTYPE_RSA))...
Hello, I'm Kinda New To B4a and for sure using Keystore. (never used before) I'm having a problem where I'm trying to save the new generated pair of RSA, 2048 keys into the KeyStore of where I believe that used to keep the private key safe, and constant where the public key can be saved on a...
This little tutorial is about signing and verifying data you send/receive between apps (= all "programs", even websites). You can use it in B4A without a change (I don't know how B4i works, but I assume there are similar libs).
You should know how RSA works. If not, take a Google search and you...
Hi, I have the following code
Dim su As StringUtils
Dim Bconv As ByteConverter
Dim ForeignPubKeyString As String
Dim ForeignPubKeyBytes(0) As Byte
Dim ForeignPrivKeyBytes(0) As Byte
Dim ForeignPrivKeyString As String
Dim...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.