Questions tagged [encryption]

Encryption refers to the conversion of information, known as plaintext, into an indecipherable format called ciphertext. This transformation is achieved by employing a specialized encryption algorithm along with an additional factor called the encryption key. Essentially, only individuals possessing the corresponding decryption key possess the capability to effortlessly reverse this procedure and retrieve the original plaintext. Inquiries concerning the fundamental concepts of encryption may receive more comprehensive responses by seeking assistance from experts on encryption.

Securely Upload Files with JavaScript

Are there any methods to utilize javascript or ajax for encrypting file uploads securely? If so, could you provide a sample code snippet or direct me to a functional example? ...

Transmitting encoded bytes data via JSON

Currently, I am developing a Python RESTful API and facing the challenge of transmitting bytes-encoded data (specifically encrypted data using a public RSA key from the rsa package) over the network in JSON format. This is what the scenario looks like: & ...

I need help creating a symmetric key of AES-256 in PHP

Despite my extensive search efforts on Google, I have not been able to find a direct and clear answer to my question. Therefore, a simple yes or no response would be greatly appreciated. I have been tasked with creating an "AES-256 symmetric (also known a ...

Secure PHP Encryption with Added Verificationchecksum

I'm working on securely passing a JSON string between two web applications via URL parameters (for an internal SSO server). My goal is to encrypt the user payload object JSON string with a pre-shared key, send the user to the service provider application ...

Steps to modify the servletRequest's content length within a filter

My main objective is to secure the POST body requests sent from my web application to my service by encrypting them. This encryption process takes place within a filter in my system. However, I've encountered an issue related to content length. When ...

Guide on decrypting a file encrypted with C# using Node JS

I currently have encrypted files in C# using DES and PKCS7 encryption. My objective is to decrypt these files in Node JS. The decryption code in C# that I am using appears like this: public string SSFile_Reader( string fileToDecrypt ) { DESCryptoService ...

The process of "encrypting" a message using a specific set of guidelines often yields an unfinished outcome

I need to develop a function that encrypts a user's message and returns the encrypted string based on specific rules: Alphabetic Uppercase Character [A-Z]: Convert to lowercase and add a ^ character at the end Alphabetic Lowercase Character [a-z]: R ...

Encrypting data using PHP's OpenSSL functions can help protect against the inclusion of special characters

I am looking to create an encryption method for retrieving variables passed in a URL and for making asynchronous calls. Here is an example: $textToEncrypt = "Hello World"; $encryptionMethod = "AES-256-CBC"; $secretHash = "cVb67YtfAz328oOikl96vBn"; $iv = ...

Steps to supplying the private key when using the openssl_private_decrypt() function

I have encrypted a value using my public key but I am unable to decrypt it with my private key. Is there something wrong with my code? Here is the script that I am using: <?php $encrypted = "Q4tmeBDTS+M2UriF6zNBJYrWcXJuyclWVAFLZaOSNwTS0FOkqd/7yQ9KrwL ...

The md5 hash outputs identical results, however the base64_encode outcomes differ

I've been attempting to link my website to a payment platform that necessitates a specific validation key which is initially md5 hashed and then base64 encoded. The instructions guide provided an example with a given input string: input EX123123456100.00 ...

Deciphering a data from a document that has been encrypted using Fernet

Currently, I am in the process of decrypting a password retrieved from a table that was manually decrypted by using Python's cryptography.fernet class. The manual encryption for the password is as follows: key = Fernet.generate_key() f = Fernet(key) ...

Converting from PHP mcrypt to openssl BF-CBC: achieving consistent encryption results

In the process of replacing current encryption and decryption functions that utilize mcrypt blowfish cbc mode with their openssl counterparts. It is crucial for the new methods to be compatible with older values. The decryption operation is functioning c ...

Algorithm for encryption and decryption using symmetric keys

Can anyone recommend a reliable symmetric-key encryption algorithm that works seamlessly with both JavaScript and Java programming languages? I attempted to implement one myself, but encountered some complications related to encoding. ...

How can I securely store passwords for web scraping with Puppeteer to ensure maximum safety?

Looking for advice on scraping a website that requires login. The current code saves username and password in a config JSON file, which poses a security risk if the file is accessed by unauthorized individuals. Is there a more secure method, such as encr ...

Tips for securely encrypting a PHP file when combining it with an HTML file using the phpB

I am attempting to encrypt a .php file using phpBolt. It works fine when the file contains only PHP code, but it fails when there is a mixture of HTML and PHP. Here is the encryption code: <?php /** * src : source folder * encrypted : Output folde ...

What is the process for encrypting and decrypting image files over the internet?

I'm currently developing a web application that requires loading images into a canvas object, followed by extensive manipulation. My goal is to conceal the original source image file (a jpeg) in such a way that users on the client side cannot access it usi ...

Having difficulty interpreting an encrypted string retrieved from a Web Request using a StreamReader

I am trying to fetch a JSON string from a specific URL, but the string is encrypted and saved as a .txt file. I need to decrypt this string within my application. Below is the HttpWebRequest code I am using to retrieve the response string: public string ...

Securely store files by encrypting them with Node.js before saving to the disk

At the moment, I am making use of the multer library to store files on the File system. This particular application is built using Node and Express. I currently have a process in place where I save the file on the server first and then encrypt it. After e ...

Obtain identical encryption results with CryptoJS (JavaScript) and OpenSSL (PHP)

I am in the process of integrating a PHP encryption function into a ReactJS application. I have a requirement to transmit the token in a specific format that was generated using the OpenSSL library function (openssl_encrypt). It has been observed that the ...

Is encryption functionality disabled in versions 5.6 and newer?

Having trouble encrypting passwords with this code in PHP 5.6 or later versions? I need a new code that uses the same algorithm, please advise. Could you provide me with alternative code that maintains the current encryption algorithm? <?php class Enc ...

Utilizing AES encryption in C# and decrypting it in Angular, converting it from a byte[] / number array with the help

I am looking to securely encrypt and decrypt a byte[] in a C# API endpoint, then convert the decrypted document to base64 for viewing in a PDF viewer within an Angular 14 app. I came across this helpful guide on Stack Overflow [https://stackoverflow.com/q ...

Exploring how to read KMS SES-encrypted messages using boto3

I'm attempting to adapt the code from the following link to Python using boto3: https://github.com/gilt/node-s3-encryption-client/issues/3 However, I've hit a roadblock when trying to retrieve the plaintext from KMS with the code below: metadat ...

Merging backend code (Java and Python) into HTML for seamless integration

While I have a solid background in back-end coding languages like Java and Python, the task at hand requires integrating this code into a website. The backend code comprises various methods and classes to encrypt text messages using encryption techniques ...

Securing the connection between clients and servers through encryption

For my mobile client, I am using Xamarin, with node.js as my backend and MongoDB as the database. The main issue I am facing is how to securely store user data in the database. If I only do server-side encryption, there is a risk of hackers intercepting th ...

Inquiry regarding the encryption methods I am using

After implementing a login system, I took steps to enhance its security. First, I generated a salt for the passwords: $salt = openssl_random_pseudo_bytes(1024); file_put_contents("salt.txt", $salt); Then, I hashed the passwords using the whirlpool algori ...

Finding an encrypted value using Laravel Eloquent ORM: A step-by-step guide

In my Laravel project, I am working with encrypted records using the php-encryption library before storing them in a Mysql database. Currently, when searching for a record based on an encrypted value, I loop through all the records to find a match, but thi ...

Obtain a numerical output from a selection of numbers

I am facing a simple problem that I can't solve due to my lack of knowledge and have not been able to find any solution online. What I want to achieve is: Create a "value 1" from an array of integers. Generate a random "value 2". Check if the rando ...

An easy guide on incorporating external npm modules into Angular 2, such as an encryption library

Within my Angular 2 application (utilizing the SystemJS module manager and Typescript as the scripting language), I am in need of importing an npm module for encryption purposes. This could be either Crypto-JS, Forge-JS, or any alternative that serves the ...

Encryption and encoding of Symfony2 source code

Our team is working on a project using the Symfony2 framework and we plan to sell the application to clients. To protect our source code from being accessed by customers, we are exploring options for encrypting it. However, we have encountered difficulties ...

Tips for safeguarding your passwords across diverse authentication methods

Exploring a new project idea, I am interested in supporting the SASL Mechanisms for authentication, particularly PLAIN and DIGEST-MD5. I am curious about how to securely store users' passwords when implementing these two authentication methods. When ...

Error in decoding with RSA padding check PKCS1 OAEP MGF1 routines in JSencrypt for Node.js Crypto

I've been utilizing the NodeJS Crypto module for encryption and decryption with RSA on the backend, while using JSencrypt for frontend RSA operations. The problem arises when I attempt to encrypt data on the frontend using a public key, resulting in an er ...

Exploring the process of enabling full text search on a multi-page encrypted document

I am faced with the task of managing hundreds of documents, each consisting of multiple pages. Users need the ability to search within a document for specific words or sentences. My goal is to retrieve all files that contain the searched text. Currently, ...

Can we rely on the security of Ionic 4 secure storage encryption?

I'm currently developing an application that necessitates the user to be in close proximity to a specific GPS location. At present, I am obtaining their location every 30 seconds, transmitting it to my server, checking if they are near the desired location ...

Secure your data with public key encryption and decryption using the Crypto Module in NodeJS

I have a challenge with encrypting/decrypting data using a public key that is stored in a file. The code snippet below illustrates my approach: encryptWithKey (toEncrypt, publicKeyPath) { var publicKey = fs.readFileSync(publicKeyPath, "utf8"); ...

Develop a custom polymorphic deserializer in Java Jackson for encrypting and decrypting fields

In my application, I have specific fields within certain objects that require encryption when serialized for storage in the database. While these fields do not need to be encrypted while in memory, I wanted to implement a transparent solution within the c ...

The decryption process using GnuPG is successful on Windows but encounters issues on Linux

I am currently utilizing the python-gnupg library to decrypt a file using a self-generated key. Strangely, the following code executes successfully on Windows: import gnupg import os key_data = '''-----BEGIN PGP PRIVATE KEY BLOCK----- <key data here> ...

Securing data with Angularjs encryption and Nodejs decryption using CryptoJS

I am having difficulty with encrypting data in AngularJS and decrypting it in NodeJS. After referring to a similar query on StackOverflow, I attempted to implement CryptoJS in my AngularJS application using the following code: Angular CryptoJs Encryption ...

Converting a document into an ASCII encryption key

I am attempting to encode a user input file using a random ascii key. I have managed to generate the random key and convert the file contents into ascii, but I am struggling with how to apply the key for encryption. I have tried several approaches, but my ...

What is the best method for encrypting a URL that contains AngularJS data?

Here is the URL that needs to be encrypted: <a class="btn btn-success btn-sm btn-block" href="@Url.Action("myAction", "myController")?Id={{repeat.Id}}&HistoryId={{repeat.HistoryId}}" ng-cloak>View History</a> I am seeking guidance on enc ...

Can you recommend a basic, invertible, non-secure string cipher function that performs exceptionally well in terms of data dispersal?

I am in need of creating two functions to obscure and reveal a string, following the structure below: string encrypt(string originalText, string key) string decrypt(string scrambledText, string key) I require these functions to be concise and easy t ...

PHP (specifically openssl) is effective for decrypting data, whereas javascript (cryptojs) has proven to be ineffective

Decryption is functioning using php/openssl, and I can successfully retrieve my plain data. Here is the specific call that is defined: <?php function decryptString($data, $key) { return base64_decode(openssl_decrypt(base64_decode($data), "AES- ...

Node.js decryption using AES-256-GCM algorithm

Currently, I am in the process of decrypting the data that is housed in my database before it gets sent to the client side. To achieve this, I have incorporated the use of the built-in crypto module along with AES-256-GCM encryption for safeguarding the d ...

Exploring Laravel 4.2 queries on a database with encrypted column functionalities

In my current controller code, I am displaying a set of records. Here is the snippet: public function view() { $title = "View Guardian Information"; $vPa = DB::table('dbo_guardianinformation') ->join('dbo_cities ...

When a string that has been encrypted is passed through json_decode, the function may return a

In an effort to protect my database information, I have implemented encryption using simple mcrypt functions for handling JSON data. Here are the functions I've created: function encrypt($key, $data){ $encrypted_data = mcrypt_cbc(MCRYPT_RIJNDAEL_192, ...

Transforming Python AES into Node JS

I've encountered a challenge trying to make existing legacy Python code encrypt/decrypt data the same way as NodeJS. Although the first 16 characters are correctly decoded, I'm facing issues with the rest of the process. Here's the Python code snippet: f ...

Is it safe to utilize Ajax and jQuery in conjunction with a PHP script to authenticate a user during login?

Hey there! I have a question about the security of using the jQuery.post function in jQuery to send a user's login information to a PHP script. Here is the piece of code I am considering: $("#login_form").submit(function() { var unameval = $("#use ...

Error: The initial parameter must be a string, Buffer, ArrayBuffer, Array, or Array-like Object. An object type was passed in instead in CryptoJS

In my quest to encrypt and decrypt data in react-native, I embarked on using the crypto node module by incorporating it into my react native project through browserify. While attempting encryption with the code snippet provided below, an error surfaces sta ...

What steps should I follow to create the decrypt function for the encrypt function I've implemented?

Recently, I've come across an encrypt function that I am struggling with: def encrypt(password): for i in (password): not_Encrpyted = ''.join(dict_Chiper[i] for i in password) Encrpyted = ''.join(reversed(not_Encrpyted)) return Enc ...

NodeJS reports an invalid key length, while C# accepts the key length as valid

Currently, I am in the process of converting Rijndael decryption from C# to NodeJS. The Key (or Passphrase) being used is 13 characters long, while the IV used is 17 characters long. Note: The length choice for both Key and IV is beyond my control Disp ...

Encrypting PHP Data

I cannot predict the outcome. Here is how I encrypt: const METHOD = "AES-256-ECB"; public $key; public function encrypt($string,$key){ return strtr(base64_encode(openssl_encrypt($string, $this::METHOD, hash('sha256', $key, true))), &ap ...

Encrypting data between two Node.js servers

I am looking to create a Node.js daemon that can operate across multiple computers while facilitating message exchange between the daemons. Security is paramount, so I want to ensure the communication is encrypted. However, I am uncertain about which encry ...