- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Broadcom Support team
Can you give me an example of RSA relative functions? For instance:
rsa_init, rsa_free, rsa_public, rsa_private ......
Thanks,
Alinket Engineer
- Labels:
-
SPI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Working on a sample app of RSA related functions.
Thanks,
-Seyhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
Is there a way to import an existing RSA public key and encrypt with it ?
Thanks,
Pascal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks but unfortunately there is no clue about importing an existing RSA public key in this snippet.
The rsa_usage() function calls :
rsa_gen_key(rsa, 1024, 65537);
I would like to call instead something like:
rsa_import_pubkey(peer_pub_key);
Thanks,
Pascal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll second that request for sample code that imports an RSA public key. I'm looking at ways to do a secure firmware update by signing the image, and the rsa_pkcs1_sign/verify functions in the WICED API look like just what I need.
seyhan, looking at your modified crypto.c code snippet I have a few questions/concerns:
- no runtime seed is being provided to srand(), so rand() will generate the same series of pseudorandom numbers every time the code snippet is run
- rand() is generally not considered safe to use for cryptography (fine for sample code, but probably worth a mention in a comment)
- I *think* the rsa_context 'rsa' itself still needs to be freed, even after calling rsa_free(rsa); (That's just my guess based on the one-liner description of rsa_free(), I could be wrong.)
Cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Just bumping this ticket. Any progress on a PKCS#1 signature verification example that uses an RSA key imported from another system? Alternatively, is there any documentation to help explain the 'mpi' data elements used in the rsa_context structure?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for the delay, we will have to investigate the best way to address these types of inquiries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to extract the public key from rsa context after the key pair has been generated? I can see the rsa context structure in crypto_structures.h but there is no description of what those variables mean. Without the ability to extract and publish the pubic key, RSA functions are nearly useless. Thanks for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Kthakur
Thank you reply my questions. We had sloved this issue last year. You can close this issue now.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi lintaot,
Would you be able to share what you're doing to solve the original problem you posted about? I think what kthakur is finding is similar to what I encountered when trying to use the RSA library -- there's no clear way to import or export an RSA key to/from a standard format. The rsa_context type isn't useful outside of the WICED framework.
For now I've had to workaround using RSA altogether, but it'd be still be nice to get some direction on this.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The following functions checks the RSA keys.
/**
* @brief Check a public RSA key
*
* @param ctx RSA context to be checked
*
* @return 0 if successful
*/
int32_t rsa_check_pubkey( const rsa_context *ctx );
/**
* @brief Check a private RSA key
*
* @param ctx RSA context to be checked
*
* @return 0 if successful
*/
int32_t rsa_check_privkey( const rsa_context *ctx );
Seyhan