750 questions
0
votes
1
answer
173
views
Why do I need an IvParameter and how do I implement it?
I'm trying to write a java program that encrypts and decrypts a byte array of text based on a password, but when decrypting, it returns an error
Error message:
Exception in thread "main" ...
0
votes
0
answers
39
views
How to encrypt file with ClearKey for Encrypted Media Extensions API?
I am playing around with the Encrypted Media Extensions API a bit and wondering about ClearKey encryption. As I understand it, the target file, or segments of it are encrypted using a symmetric key ...
1
vote
0
answers
98
views
ZIP with password protection scheme validation
I'm using ZIP format for backups of an app. Size is probably from 10Mb to 2Gb. Amount of files inside might be up to 10k.
I wanted to add a password protection but found out that both ZypCrypto (...
1
vote
0
answers
147
views
SecureBlackBox: decode AES-256 data
I am using SerureBlackBox and I need to decode text. In the function below, when I do:
Crypto.Decrypt(@fDataBytes[0], Length(fDataBytes), @fDecryptedData[0], OutSize);
it throws an error:
Invalid ...
0
votes
1
answer
70
views
Where to implement the encryption on access token in clean architecture of android?
I implemented the Symmetric encryption of access token using Android KeyStore, but where I must do encryption process
Repository class where I receive data from Remote.
View Model class after passing ...
0
votes
0
answers
60
views
Handling Short Plaintexts in Format-Preserving Encryption: A Challenge with FF3 Algorithm Minimum Length Requirements [duplicate]
I've developed a Python program that performs format-preserving encryption (FPE) for all data types, including numeric, alphanumeric, and alphabetic. It ensures that the data type (alpha or numeric) ...
1
vote
2
answers
177
views
Cannot decrypt with node.js encryptedstring using openssl in bash (symmetric encryption)
I'm symmetrically encrypting data using node.js code, that I'll decrypt using the openssl command in a bash script.
I have encrypt/decrypt functions in both environments that work as expected, but ...
0
votes
0
answers
43
views
Data Integrity S3 During Transit for Large File
I'm new to encryption, so my question might seem basic. Despite reading multiple articles, I'm still unsure if I fully understand.
I have an S3 bucket, bucket_a, which will be used by different AWS ...
1
vote
0
answers
86
views
JsonApiDotNetCore and filtering using a udf
I am using JsonApiDotNetCore, .NET Core, and EF Core on SQL Server and creating a REST project implementing the Json API standard.
I have plenty of resources (models) but one of them has some fields ...
0
votes
1
answer
541
views
How to encrypt with preserving the format alphanumeric texts
How to do FPE (format preserving encryption) on a text like 'A123456' , if the encryption preserved the format I should get a string with a char than 6 digits , for example 'Z655432' , I used the ...
1
vote
0
answers
124
views
Invalid Token error when using Fernet(Python)
I'm writing a simple encryption/encoding program using base64 and fernet, but when decrypting fernet keeps raising an Invalid Token error.
Here is the code:
from cryptography.fernet import Fernet
...
0
votes
1
answer
5k
views
java.security.cert.CertPathValidatorException: Algorithm constraints check failed on signature algorithm: SHA1withRSA
Need to set useSSL=true for mysql cloud connection for jdbc connect string but getting this error.
SHA1withRSA has been restricted in our environment. How do I resolve this
java.security.cert....
0
votes
0
answers
70
views
How do I use Rfc2898DeriveBytes in a symmetric algorithm?
I have created a stream that takes a plaintext input stream, and it's read method will return cypertext based on the input stream;
I've been reading that it is recommended to use the ...
0
votes
0
answers
66
views
Having a hard time displaying output from an API
I'm learning how to use openssl and learn more about it.
I wrote a very short line of codes which AES encrypts plaintext and display the output as ciphered text. I had no idea how to display its ...
0
votes
0
answers
144
views
T-SQL ENCRYPTBYPASSPHRASE key derivation procedure [duplicate]
ENCRYPTBYPASSPHRASE in T-SQL takes a passphrase as a parameter. I'm wanting to encrypt some data in the same way outside of SQL server, in such a way as said data may be decrypted using the ...
1
vote
0
answers
408
views
How to implement E2E encryption in a multi-user app?
I'm running an SaaS application with support for multiple tenants. Each tenant can have multiple users assigned. Those users collaborate on a database of documents that's owned by the tenant. With my ...
2
votes
1
answer
1k
views
How to check whether age public key and private key couple with each other
Age is a practical toos for file encryption, here it is its presentation page: age.
With age-keygen, we are going to be able to create a couple of public key and private key together like below:
# ...
0
votes
0
answers
105
views
Decryption with Node.js crypto module does not result in the encrypted text
I am using AES-256-CFB encryption method to encrypt text but when decrypting using the same parameters it doesn't give the text I encrypted
Code used to encrypt
const ss = Buffer.from(decipher.update(...
0
votes
0
answers
78
views
Crypto++ text file Decryption not working properly
I am trying to decrypt an encrypted file Using the Crypto++ Library. The encryption seems to work perfectly as the file that I am encrypting has Cipher text when I open it. However , just in case I ...
-1
votes
1
answer
155
views
Cannot match Rijdnael encryption between C# and Javascript / Node
I need to convert an Rijndael encryption function from C# to Node. But I cannot match the result, even with the same Key, IV, Mode and Block Size. What am I doing wrong?
C# MRE:
using System.Security....
-3
votes
1
answer
162
views
Encrypt and Decrypt Files with Symmetric Algorithms
i want to encrypt and decrypt files using Symmetric Algorithms. for small file there is no issue but if our file is large for example (100 mb, 1 GB, 5 GB,...) simple codes does not work and We have to ...
0
votes
1
answer
481
views
TypeError: DataFrame.any() takes 1 positional argument but 2 were given
Trying to encrypt a sentence with a key encrypt but i have an issue with the use of df.any()
df = pd.DataFrame(data=encryptionkey)
df['Character'] = df['Character'].astype(str)
df['Byte'] = df['Byte']....
0
votes
1
answer
30
views
Execution Time Difference between two bit-wise differential execution
I found an interesting phenomenon, when I try to do symmetric encryption (Bit-wise XOR execution) for a figure with another random figure. The execution time is different between encryption and ...
1
vote
0
answers
237
views
How to generate same symmetric key using same password and salt when using CryptNG
I am using Microsoft bcrypt (aka BestCrypt, Cryptgraphy Next Generation, Cryptography NG, CryptNG) library to generate symmetric keys:
BCryptGenerateSymmetricKey
BCryptKeyDerivation
But every time I ...
0
votes
1
answer
107
views
Can OPENSSL BIO be used within a C program that uses OPENSSL EVP to encrypt/decrypt a file?
Reading the openssl documentation I realized that you can use the openssl EVP API, to replicate what you can do with the commands:
$ openssl aes-256-cbc -in text.txt -out text_out.txt -e -kfile ...
4
votes
0
answers
312
views
Need to confirm its 256 bit file encryption/Decryption or not?
We have written 256-bit file encryption/decryption code in Java. It's working fine and it properly encrypts and decrypts file with same secret key +salt combination.
import java.io.IOException;
import ...
1
vote
1
answer
316
views
Swift encrypt the symmetric key itself
So we hace this security where we want to encrypt the AES generated Symmetric key itself.
Basically this flow:
Backend send us key -> we create a symmetric key -> we encrypt data with symmetric ...
-1
votes
1
answer
73
views
Is it the same as using SSL if I implement security logic similar to SSL on my webpage?
Assuming that my page doesn't have SSL. Let's suppose the following steps:
User makes a request to my webpage (let's call it
www.mypage.com).
Client-side JS makes a SYMMETRIC KEY.
Client-side JS ...
0
votes
0
answers
499
views
Postgres Query running slow, using pgcrypto extension in postgres sql
I am facing issue while using the django-pgcrypto-fields. Model has charsymmetricfield and emailsymmetricfield.
using pgcrypto externsion in postgres sql, following is the output for below queries
...
0
votes
1
answer
356
views
Decryption of encrypted string shortens the string in .net7
I implemented methods for symmetric encryption and decryption of a string in .net core 3.1. Now I'm migrating a project from .net core 3.1 to .net 7. Encryption works fine, but when I decrypt the ...
0
votes
0
answers
130
views
AES 256 ofb encryption/decryption not working with Openssl3.0
Currently we are using openssl1.1 for a file encryption/decryption.
We are facing a problem when we migrate to opensl3.0.
Below is the code flow used to encrypt the file.
// Set up the encryption ...
-2
votes
1
answer
678
views
Simple to implement symetric encryption [closed]
I have a small app of little value and concern but the user has to identify themselves (imagine a budget book for personal use).
To make life easier on the twelve colonies the user can choose to auto-...
0
votes
0
answers
177
views
Problem with the exception "The input data is not a complete block" in c# when I try to encrypt a file
I tried to create a program in .Net 7 that encrypts a file, saves it into another file and decrypts the encrypted file. The problem is when it tries to decrypt the encrypted file, it returns the ...
-2
votes
2
answers
113
views
A problem with an encryption algorithm program written in C#
I wrote a program in .NET 7 that encrypts a string and returns another string that contains the encrypted form of the first string. The problem is the program does not return anything, only a null ...
0
votes
1
answer
588
views
IssuerSigningKeyResolver Error Cannot Implicitly Convert Type
I'm doing a course on Udemy
Build an app with ASPNET Core and Angular from scratch
At the end of Section 4 I'm getting this error message:
Cannot implicitly convert type 'Microsoft.IdentityModel....
0
votes
0
answers
111
views
Encryption and Decryption in PHP occasionally failing
We're trying to implement an authenticated symmetric encryption in PHP, which works most of the times, but occasionally fails, and we do not really understand why. The code is:
// Encryption of $...
0
votes
0
answers
249
views
AES-CBC (256bit) Different outputs between C++ and PHP
I am currently attempting to implement the AES-CBC encryption algorithm into my C++ Code. I am sourcing the code from this github https://github.com/WaterJuice/WjCryptLib and the only issue I have had ...
0
votes
1
answer
4k
views
Is AES in GCM mode still safe to use? And is there an even better solution to encrypt important data? [closed]
I have been searching the Internet for a good solution to securely encrypt my data, but I couldn't really find anything about it.
I would like to have a strong encryption of the data, like in password ...
-1
votes
1
answer
370
views
Is CryptoJS.AES ironclad by using a random 256 bit string (one time use)?
I'd like to store a secret on my server securely, and permanently. Before storing it, I would run the following code:
import CryptoJS from 'crypto-js';
const SECRET = 'secret';
const key = CryptoJS....
3
votes
1
answer
2k
views
Protecting encryption key with TPM when using DPAPI
DPAPI on Windows provides functions to encrypt and decrypt arbitrary data. Functions provided by DPAPI include CryptProtectMemory, CryptUnprotectMemory, CryptProtectData and CryptUnprotectData. I ...
0
votes
0
answers
208
views
How to encrypt deep link for email without exceeding URL character limit?
It is looks like the encrypted string that is generated is too long and exceeds the maximum URL character limit when I am trying to encrypt DeepLinkModel having more than 20 count of DeepLinkDataDto.
...
1
vote
1
answer
1k
views
Streaming decrypt using openpgpjs library consumes too much memory for large files
I am using openpgp library to encrypt and decrypt a file inside a React component. Encryption works as expected with less memory usage but decryption takes too much memory.
Library version that I am ...
1
vote
1
answer
1k
views
How to use the PostgreSQL pgp_sym_encrypt / decrypt function to encrypt data used in the Like command of the WHERE clause of the SQL DELETE statement?
I need to perform a delete operation on a PostgreSQL database, where the text fields involved were encrypted using the pgp_sym_encrypt() function. I'm trying to make the comparison in the Like command ...
0
votes
2
answers
1k
views
Encryption/decryption fails
I have a helper class AES encrypting/decrypting a String which is mostly a clone of the code provided in Baeldung AES encryption example
The code looks as follows:
import java.security....
0
votes
1
answer
2k
views
What does it mean when it's said it's a "16 bit key" or "64/128 bit key"
I need some detailed explanation on the length of the key? What it means when someone says it's a 16 bit key or 128 bit key etc. The Wiki definition is "In cryptography, key size, key length, or ...
0
votes
0
answers
151
views
how to securely store Masterkey in the application?
I have a spring boot java application in which all of the necessary data including clients' passwords, P12 passwords, ... are encrypted by the Masterkey.
The encryption type is Symmetric.
At the start ...
2
votes
1
answer
995
views
How to encrypt with iOS CryptoKit and decrypt with C# in NetCore
I would like to encrypt data in iOS app with a SymetricKey and the CryptoKit and decrypt on server side with C# in Net Core.
iOS code:
class Security {
static let keyStr = "...
0
votes
0
answers
117
views
How to make encryption faster in c using AES128 CBC faster using OPENSSL
The code works fine it's just I want it faster but am unsure how to. here is what the code does: This code encrypts the contents of a specified directory and all its subdirectories recursively. The ...
0
votes
0
answers
279
views
Sharing of vector for AES encryption and decryption
We are using AES encryption to encrypt and decrypt data that is sent between browser and the server. AES encryption needs a secret key,which is hard coded and known by the client and the server.
Apart ...
0
votes
0
answers
106
views
should i share the secret key with client in order to implement JWT with symmetric key in the Authentication scenario
when I need to make an authentication using JWT with a Symmetric key, is it required to share the secret key with the client? I mean why? I can just send the jwt to the client, and the client doesn't ...