I was wondering if I could contribute the code I came up with (with some AI assistance, but I was only able to come to the answer because I understood what was going wrong) to encrypt private keys in Python. My group was given a side project from Family Search to build a one stop application that gives and ranks results from Family Search and other family history sites (at this point, we're thinking of promoting it as a free preview, and we'll try to highlight each site's results to help promote user traffic). Anyway, my group is full of data scientists, so they're most comfortable with Python. Unfortunately this sdk isn't being kept up with, and there wasn't any example code to get the access token with Python (it was all in Java/Ruby/PHP for Client Credentials Authentication). Python's main cryptography packages were insufficient to encrypt the private key with a timestamp. However, we did some testing with JavaScript and got it working there so the problem wasn't with our ClientID.
After doing some research, I realized how uncommon encrypting a private key was. It's just not something Python packages were built for, but node.js did work. ChatGPT was no help, but after some deliberating with Claude, Claude decided to do the behind the scenes math that Node.js's privateEncrypt library does (still used some of Python's crytography libraries to get private numbers, padding, converting to integer bytes, grabbing the private exponent, and the modulus n). I was wondering if I'd be able to contribute this code since it's a unique problem to Family Search since the public key is used to create a client id, and the private key is encrypted and sent instead of the other way around.
I don't know if anyone is still running this sdk, but let me hear your thoughts if you are.
I was wondering if I could contribute the code I came up with (with some AI assistance, but I was only able to come to the answer because I understood what was going wrong) to encrypt private keys in Python. My group was given a side project from Family Search to build a one stop application that gives and ranks results from Family Search and other family history sites (at this point, we're thinking of promoting it as a free preview, and we'll try to highlight each site's results to help promote user traffic). Anyway, my group is full of data scientists, so they're most comfortable with Python. Unfortunately this sdk isn't being kept up with, and there wasn't any example code to get the access token with Python (it was all in Java/Ruby/PHP for Client Credentials Authentication). Python's main cryptography packages were insufficient to encrypt the private key with a timestamp. However, we did some testing with JavaScript and got it working there so the problem wasn't with our ClientID.
After doing some research, I realized how uncommon encrypting a private key was. It's just not something Python packages were built for, but node.js did work. ChatGPT was no help, but after some deliberating with Claude, Claude decided to do the behind the scenes math that Node.js's privateEncrypt library does (still used some of Python's crytography libraries to get private numbers, padding, converting to integer bytes, grabbing the private exponent, and the modulus n). I was wondering if I'd be able to contribute this code since it's a unique problem to Family Search since the public key is used to create a client id, and the private key is encrypted and sent instead of the other way around.
I don't know if anyone is still running this sdk, but let me hear your thoughts if you are.