Newest encryption Questions

Q&A for professional and enthusiast programmers

the result of ECB Encryption is maybe different. it is same as the result of CBC

public class Symmetric1 { /** * @param args the command line arguments */ public static void main(String[] args) throws Exception{ // TODO code application logic here ...

Convert Coldfusion binaryDecode to .net

I'm trying to replicate a function in Coldfusion that returns a string. The function looks like this: <cffunction name="createKey" access="public" output="false" returntype="string" hint="...

Rfc2898DeriveBytes in C# to hash_pbkdf2 in PHP

I have code to decryp in C# and I try to porting it to PHP, here what I have done: in C# byte[] decryptedBytes = null; byte[] saltBytes = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 }; var key = new ...

How to decrypt a file in C# that was encrypted on Unix/Solaris using AES-128

I have been supplied with a file that was encrypted on a Unix Solaris 10/SunOS 5.10 machine using the $encrypt method. I believe this to have been done using an aes algorithm. I need to decrypt this ...

Where should I embed the code for encrypting / decrypting torrent files in the Transmission?

I have a task to make a download torrents only when authenticating the user. To do this, I will make a server that will give encrypted torrent files and on request from the client (by login and ...

What's the easiest way to encrypt a short plaintext to a short ciphertext in javascript?

I tried to use CryptoJS's AES functions but even very short plaintexts become 32 character base64 strings. I am working with an application where the user will have to type the ciphertext manually ...

How to encrypt nvarchar column in oracle?

I have a table containing nvarchar datatype columns (contains text in different languages). I want to encrypt data before inserting into table and decrypt the same while fetching records. Please ...

AES: encrypt from go, decrypt from NodeJS

I've been trying to encrypt stuff from go and to decrypt it from NodeJS. Here's my unsuccessful attempt: main.go var ( passHash = []byte("hash") plainText = []byte("message") ) type ...

porting C# Rfc2898DeriveBytes in PHP using hash_pbkdf2 [on hold]

How to implement following code in PHP? byte[] passwordBytes= Encoding.ASCII.GetBytes("password"); byte[] saltBytes= Encoding.ASCII.GetBytes("12345678"); using (RijndaelManaged AES = new ...

javax.crypto.IllegalBlockSizeException: Data must not be longer than 256 bytes when using java8 parallelStream()

My code: blotterlist.parallelStream().filter(p -> p.size() > 0).forEach(p -> decrypt(p)); private void decrypt(List<BlotterView> blotter) { for (BlotterView blotterView : blotter)...

Public/Private Key encryption avoid MITM attack on a local network

I have a sysem where I want to minimise outbound network communication to the internet. However, I need to ensure communication between local network clients and the local server is secure. I can't ...

ATMEL ECC508A key agreement reverse engineering

My cryptography problem is following. I have a smartplug with a ECC508A chip and i must make crypto communication with an Android smartphone. My smartphone (Alice,host) cannot create same key ...

How to make sure a user is entering a specific string?

I'm trying to ask a user whether they want to encrypt or decrypt a message, and I know that I need to use userInput.equals("encrypt"), but i want to use a while loop with !=. while(userInput.!...

Secure channel with postMessage through IFRAME

We have an application outlined below. The UI is provided from a safe domain https://aaa.com, and hosts script from the same domain. It loads client site https://client.com to an IFRAME. This site ...

How to encrypt url in android? [duplicate]

When i decompile my apk i saw that anyone can see the url I'm connecting to.The api key that i'm using is also easily accessible.So is there any way to encrypt the String url so when someone try to ...

How to use the encrypt command?

I am looking for ways to safely store credentials in my dropwizards yaml file. I came across this bundle https://github.com/meltmedia/dropwizard-crypto I am able to successfully annotate the secrets ...

Java Transposition cipher for loop

I have been trying to recreate a python function to decrypt messages using a transposition cipher. although it keeps giving me incorrect outputs and making the messages longer. I think the error is to ...

Encyrpting a string using Triple DES in c#?

I am trying to write a c# program that will encrypt a string using an API key. The API key is generate by a third party payment gateway. The documentation is provided in java and I was able to encrypt ...

Encryption with Node Crypto - Decryption with PHP openssl_decrypt fails

I'm trying to create a JWT (JSON web token) in a node service which then needs to be checked in a PHP service. I'm creating the token as per the spec as far as I can tell, and I'm encrypting the ...

Using VB.Net encryption in PHP

I have a VB.Net application and a website. I have the class posted below to encrypt passwords and such. How could I do the same thing in PHP so users can use the same password in both places? Imports ...

usage of RSA_NO_PADDING when decrypting data with RSA private key using openssl libcrypto

I generated RSA private key and public key as below, openssl genpkey -algorithm RSA -out key.pem -pkeyopt rsa_keygen_bits:2048 openssl rsa -pubout -in pri.key -out pub.key And encrypted text file as ...

delete and restoring the .bash_profile on mac

I have accidentally encrypted my .bash_profile when I was trying to quit the vi (by entering capital X). Now i have problem accessing (appending and checking) my .bash_profile file. Is there any way ...

How do I encrypt an Okio BufferedSource?

Due to HIPAA requirements, I need to encrypt data at rest. I have a BufferedSource that contains data from my api call. The Okio documentation says Sinks may be layered to transform received data,...

Enumerate mysql table and encrypt fields

I am working on a CI 1.2 to CI 3.x upgrade. I have 3 tables with 11 fields that were encoded with SHA1 in CI 1.x. CI 3 uses AES-256. In effect I need to execute an UPDATE tablex set (fielda = $this-...

Decoding RSA encrypted String - BadPaddingException: Message is larger than modulus [Java]

I'm new to the crypto scene. I'm trying to port the DecryptStringTest method from here to java. I load the private key from an RSA xml format (produced via c#). I place those values in the ...

Python 3.6 File Decryption with XOR

I've written a bit of code that works great in encrypting a file, however I do not know how to decrypt it. Could someone explain to me how to decry the encrypted file? Thanks. Code: from itertools ...

Which one is better? using your own encrypting algorythm or using md5/sha1? [on hold]

I want my passwords to be secure in database. Even if someone leaks the passwords I don't want anyone to be able to decrypt them.

PyCrypto Decryption Mess

So I'm trying to make a simple AES encrypt/decrypt system right now in Python... However when it decrypts it has a bunch of /xxx/xxx/xxx/xxx/ in front of the decrypted string. How do I clean it and ...

AES-CBC encrypted output in CNG is not matching with online tools

I am new to CNG. I am playing with the basic program from msdn site. I have modified the input plain string and testing the output using other websites that provides the aes cbc encrypted output. ...

Getting simple error in Python 3.6 XOR

I am using Python 3.6, and am trying to encrypt a file using XOR. I have a simple bit of code: from itertools import cycle def xore(data, key): return ''.join(chr(a ^ ord(b)) for (a, b) in zip(...

Can the JVM overwrite all its memory on shutdown

I'm working on some application that works with secret data in memory. Is there a way to make sure all the memory is overwritten when the JVM terminates? Nothing of the secret data should be left in ...

Decryption method bad padding

I'm doing aes algorithm. so far I success for encryption but I have some problems for decryption stating that "java.io.IOException: javax.crypto.IllegalBlockSizeException Input length must be multiple ...

Encrypt column of existing tables in SQL Server 2008 r2

I need to encrypt columns of existing tables. I've tried updating with encrypted value but columns become blank. Is there a way so that I can see binary value in columns instead of blank. I don't ...

what kind of cipher consists of only capital letters, numbers and equal signs [on hold]

As described in the title, what kind of cipher is composed of only capital letters and numbers, with 3 '=' as padding, and in the total of 48 bytes. I thought it maybe a Base-64 cipher, but after I ...

File Encryption and Decryption using a given key

I have a problem for school and I can't seem to figure it out. Basically, i'm in an intro to object oriented programming class, so I only need to complete this as basic as possible without using ...

entropy of an encrypted image after scrambling

i have an algorithm called the arnold 2-D map that just permutes the pixels of the image and doesn't change the vlaues of the pixels. but when i calculate the entropy values of the main image and the ...

Arduino AES256 CBC base64 and VB.net AES256 CBC base64 not matching

Hey all I have a question here. I have code for using AES 256 CBC for Arduino (esp8266) and also for my VB.net app in order for either side to send/receive data and decode/encode it. Both sides work ...

How to configure crossbar with TLS?

We are using crossbar.io in our project A few day ago we setted up ssl sertificates with letsencrypt service (cert.pem, chain.pem, fullchain.pem, privkey.pem). After that we configured crossbar.json. ...

Encrypting an SQLite file in Java Application [on hold]

Here is the scenario. I am creating an encrypted password manager. My requirement is to encrypt the SQLite file (Note: File encryption. Not the data in it!) which can only be opened (or decrypted) ...

Python decryption error 'character mapping must return integer, None or unicode' (Fernet)

I'm trying to do some simple encrypt/decrypt functions in Django. I'm storing the encrypted message and key in a single table - obviously this isn't how it would be done in the real world but this is ...

CryptoJS AES Unable to decrypt

I need to decrypt incoming requests encrypted with AES, I try to use shared example and unable to find right set of parameters Encryption:AES/CBC/PKCS5Padding AES/CBC/PKCS5 Initialization vector: ...

How to decrypt text from Mavic Pro FlightRecord data with strange signs in it

my Mavic Pro (dorne) App, DJI Go 4 encrypting the flight record data in a text of strange letter. =H PJ ²...

encrypting strings by ciphering the bytes error

here is the code: import java.math.*; import java.lang.*; import java.math.BigInteger; public class Enc{ public static void main(String[] args){ Enc e = new Enc(); String enc = e....

Convert JAVA triple DES encryption/Decryption into Javascript

I have two applications. One is at client site (Javascript) and the other is at Server Site(JAVA). I want my request and response to be encrypted. I have a JAVA application where we have used ...

C# AES-256-CFB like PHP OpenSSL encryption

One of our partner has a PHP website where we can connect using an API. This API requires some encrypted string to be sent in order to validate the client. They are using OpenSSL This is the PHP code ...

c++ CryptoPP - encrypt / decrypt with RC6

I want to encrypt and decrypt strings with RC6 but I don't understand how it works with the CryptoPP library, could you give me a snippet ? Thanks you !

Convert Decode function from Coldfusion to .NET with RC4/Hex

The coldfusion function is pretty simple: decrypt(theString,encryptKey,algorithmType,encodeType) The algorithm type is RC4 and the encode type is hex. For whatever reason I'm having quite a bit of ...

ESP8266 Sha2 256 Bit enryption Arduino

I want to connect my ESP8266 to a server that is encrypted with Sha2 256 Bits. The ESP8266 is programmed using the Arduino Library. Does the WiFiClientSecure support this encryption? How do I encrypt ...

Implementing RSA encryption/decryption

I'm trying to implement RSA encryption/decryption (a simple implementation of course, so there's no need for nitpicking) and it seems like the numbers (i.e. the keys) are fine, yet the final result is ...

nginx wordpress sub-domain lets encrypt

I ran wordpress site with this SSL tutorial. https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04 I have example.com domain. and I create test....
Translating... 0%