Most voted "cryptography" questions
Cryptography is the study and practice of the logical means used to obtain the confidentiality, integrity and authenticity of information. It encompasses among other things encryption or encryption (making data unreadable except by someone who knows a secret element, called key), hashing (in particular for storing passwords) and digital signature (proof of authenticity and integrity, in addition to irretractability).
Learn more…281 questions
Sort by count of
-
5
votes3
answers1009
viewsEncryption security in php
I know there are other things that help keep a system secure, but I would like to know specifically about one: information encryption. For example, the password is information that in my projects I…
-
5
votes1
answer251
viewsDoes it make sense to store the salt of a password with the hash itself?
Looking at tables in a database of a certain product, I came across a structure similar to this: [LocalUsers] UserId Integer PasswordHash Byte[] Salt Byte[] If an intruder gets this list, it’s…
-
5
votes4
answers1605
viewsTurn Messagedigest MD5 into a string
I am trying to generate an MD5 hash using the class MessageDigest, however, I cannot correctly display the hash as a string on the screen. The result is a string of unknown characters. Below is the…
-
5
votes2
answers132
viewsShould I encrypt the password in the application or on the server?
I am making an application that requires registration of users and my question is whether I should make the encryption in the application and save on the server or send to password and encrypt on…
-
5
votes1
answer1276
viewsEncrypt App.Config
I’m trying to encrypt my Connection string, that’s in my app.config. After reading some forums, I saw that 2 methods need to be created: class proteger_app { public static void Criptografar() {…
-
5
votes1
answer330
viewsHow to save bank data in the database?
When making a virtual store what is the best way to save the user’s bank data in the database? Credit card number, security number and expiry date. For example, using Laravel. It would use a type of…
-
5
votes1
answer901
viewsStore password in database
I have an application that needs to store passwords and get them again, this is not just for login check because the stored passwords will be used to provide access to another system (there is no…
-
5
votes2
answers115
viewsBecause Chr() is vulnerable to "cache-timing" attack and pack() is not?
Out of curiosity I am looking for and slow many things about cryptography and also looking for some libraries in pure PHP, such as Sodium_compat, for the sole reason that I understand much more of…
-
5
votes1
answer701
viewsGenerate random characters securely
Hello, I’m new to javascript and am using the following function to shuffle characters from a string in a password generator that I’m trying to develop: function shuffle(string) { "use strict"; var…
-
5
votes2
answers1238
viewsWhat’s the difference between using password_default and password_bcrypt?
Searching on hash, I noticed that the second function parameter password_hash, has two options, PASSWORD_DEFAULT and PASSWORD_BCRYPT, Exactly which of the two I should give preference to use? It’s…
-
5
votes1
answer51
viewsHow to store the password in the R script in the package 'Encryptr'?
I did it: library(encryptr) genkeys() And I created the password: 0)]30l^8 password<-"0)]30l^8" data(gp) write.csv(gp, "gp.csv") encrypt_file("gp.csv") My problem: How to automatically enter the…
-
5
votes2
answers139
viewsCan hashes be different for the same bytes?
I’ve found a flaw or I can’t deal with hashes. I have two bytes arrays random, one generated by an algorithm and one original. I am trying to make the algorithm EXACTLY the same as the original.…
-
4
votes1
answer824
viewsSSL Socket Java encryption
I’m having doubts about the Java SSL Socket. I saw on several sites that the connection of SSL Socket is encrypted, but none of the sites gives me information on how this works right. How do I know…
-
4
votes1
answer248
viewsChoosing encryption in SSL
How can I define exactly which encryption I will use in the routine below? I want to define for example that the encryption to be used is the AES, or DES, or 3DES... // Setup truststore KeyStore…
-
4
votes2
answers153
viewsChosen-ciphertext Attack what’s it like?
I’m reading about CCA but I can’t understand in any site I’m looking for, how this attack works and how to possibly avoid it?
cryptographyasked 9 years, 9 months ago Elaine 2,770 -
4
votes1
answer321
viewsView database information securely
What kind of encryption should I use to encrypt a CPF in the database and then display that same CPF (decrypted) to the client in a secure manner?
-
4
votes1
answer352
viewsHow to access PHP webservice securely from an Objective-C/iOS app?
I’m making an application where I need to securely send user data to the Web Service using PHP. For this, I’m researching security for iOS. What is the recommended method and what are the points I…
ios web-service objective-c security-guard cryptographyasked 9 years, 8 months ago Tiago Amaral 1,520 -
4
votes1
answer446
viewsEncrypt XML with TJMG Public Key
I need to encrypt this XML <?xml version="1.0" encoding="utf-8"?><Selos>…
-
4
votes2
answers962
viewsWhat is the difference between Encoding, Encryption and Hashing?
I’d like to understand the difference between Encoding, Encryption and Hashing and also examples of when using one or the other.
-
4
votes2
answers1314
viewsEncryption and its bits. How to explain?
I have this encryption table taken from a book, but I don’t understand how it works. Why is the number of alternative keys 2 raised to 32? Why each bit fits 0 and 1? Why the number needed to decrypt…
cryptographyasked 9 years, 5 months ago Felipe Jorge 1,479 -
4
votes1
answer395
viewsHow to avoid collision of upload file names
I’m making a website for upload of images, only, when I do the upload of two files with equal names, what there was before some of the file directory. This is the code I use for upload:…
-
4
votes1
answer386
viewsHow to Encrypt Images with Java RC5 Algorithm
I am trying to use the RC5 algorithm with the Cipher class of Java, but it is returning an error, someone can help me? import java.io.*; import java.security.*; import javax.crypto.*; public class…
-
4
votes1
answer1581
viewsJava text "encryptor" program problem
So, guys, I’m having a little problem with one of the work exercises that I have to do. The teacher provided a .doc with the instructions for a "Cryptographer" that you should apply a mask to the…
-
4
votes1
answer295
viewsVirus decryption - vbscript
Option Explicit On Error Resume Next dim rbs309 dim tadjakmnmfrg4460 dim icsnvk206 dim wsmp1276 dim falkal1610 dim rfqgobyeyrp5319 dim gtxhgi5556 dim mll8810 dim qxat8709 dim hgurgqrv3280 dim…
-
4
votes1
answer1731
viewsEncode and decot URL
I have an application that I need to send links with user information, basic example below: https://www.meusite.com.br/[email protected]&token=token I want to encode the part…
-
4
votes1
answer373
viewsDual cryptography
A colleague told me that he created an encryption class that implements 4 algorithms: Tripledescryptoserviceprovider Class Descryptoserviceprovider Class Rc2cryptoserviceprovider Class…
-
4
votes1
answer191
viewsWebcrypto keys derived from PBKDF2
I’m using PBKDF2 in Webcryptoapi to generate a "derivable" key based on a user input (a password) and derive a key from it AES-GCM. I’m doing a round of tests where: in the first round Gero the keys…
-
4
votes2
answers132
viewsSHA512 hexadecimal return
I found an example of encrypting a string with SHA512. public static string HashedString(string text) { SHA512Managed sha512 = new SHA512Managed(); byte[] hash =…
-
4
votes1
answer1359
viewsPostgresql md5 encryption
I am creating a table using Postgresql and there will still be a password field with MD5 encryption. What would the syntax look like in it? Because I have more contact with Mysql than Postgresql.…
-
4
votes2
answers1511
viewsCipher de Vigenere
private static void algoritmo(String input, String chave, Boolean b) { Console.WriteLine("Digite a mensagem: "); input = Console.ReadLine(); Console.WriteLine("Digite a chave: "); chave =…
-
4
votes1
answer1005
viewsBest Way to Use AES Encryption
Guys, let’s say I’m working on a system where the encryption key is derived from the user’s password (something like what Keepass does), in which case I have three questions: What algorithm to use…
-
4
votes1
answer406
viewsSelf-signed Certificate Security ( Self-signed Certificate)
I am making a Java Client-Server system that will manage computers in a room, the scenario is as follows: A computer, the server, waits for connections, when an action is made ( Block Screen ) this…
-
4
votes1
answer474
viewsCode to generate user password hash in Oracle 10G with C#?
I need to authenticate users in a web application in the Oracle 10g database, but the credentials are native to the database by running an Oracle Forms application already, and we would like to keep…
-
4
votes1
answer69
viewsParameters for encrypted columns
I am trying to create a database to save a user’s data to the SQL SERVER database, but the table has columns encrypted with Always Encrypted, resulting in a conflict error. I have tried to change…
-
3
votes1
answer990
viewsGenerate securely random string in Nodejs
How, using the Javascript language on the Nodejs platform, generate a string, preferably with configurable size, random enough to be used in routines dealing with cryptography and that for safety…
-
3
votes1
answer58
viewsCan the iv used in AES-CTR be stored in clear?
I intend to use the AES cipher in counter mode and I’m not sure if I can save iv (nonce + counter) in clear.
-
3
votes3
answers3136
viewsGenerate 32 character MD5 password with Cryptsharp
I am using the Cryptsharp library to generate password in MD5. I had read that MD5 generates string with hexadecimals of 32 characters but is generating 34 and with several types of characters. It’s…
-
3
votes2
answers972
viewsEncryption with Java
I need to encrypt the data in a user authentication session, and I would like to know the best, most secure way to work with Java encryption. Is it using Salt, MD5, AES, SHA, or other? Which API’s…
-
3
votes1
answer1347
views"Invalid Data" error when trying to decrypt a file using Tripledes
I am developing a routine that decrypts information from a ". txt" document using Tripledes. But when decrypting it generates the following error: Invalid data. Stacktrace is like this: in…
-
3
votes1
answer133
viewsRSA, Sslstream - Key Exchange
Good people, I am using Sslstream to communicate between a client and server, using OPENSSL. And this client of mine, is a machine (Digi), which as a requirement has to use RSA encryption. Then I…
-
3
votes2
answers729
viewsEncrypt source code Ruby on Rails?
I need to deploy a ready-made system made with the framework Ruby on Rails in a client’s company, the problem is that this client cannot have access to the source codes. Is there any way to…
-
3
votes2
answers626
viewsEncrypt ini files
I need a script that Compile a .ini to avoid an easy read. The file should be read with PHP. It seems that C# has a similar feature. The question is how do I do it and then read the .ini with PHP.…
-
3
votes1
answer4215
viewsError while decrypting string
I have a method to encrypt and decrypt data. I tested it in the Application Console and it works perfectly. When taking this method to the controller, I get following error: Invalid length for a…
-
3
votes2
answers729
viewsKey Doubt in Symmetric Encryption
Hello, researching on cryptography li on symmetric cryptography, asymmetric, digital signature... But I have a question, when we use a software like Truecrypt, Keepass or others of the genre the…
-
3
votes1
answer445
viewsAES and RSA encryption compatible with PHP libraries
I am starting a communication test work with a webservice, and this interaction includes the AES and RSA encryption protocols. However, the website that has the webservice (followzup) only presents…
-
3
votes0
answers162
viewsDecryption code error using Vb.net!
I’m having trouble decrypting with the code below that I found on the net: When debugging you can see that in the property TripleDES.Key has the value 16 in length and the Buffer 15, is that why?…
-
3
votes2
answers1052
viewsPass data encrypted by URL in ASP.NET MVC
I need to pass a link, but I didn’t want to leave it too exposed, I would like to know how to encrypt at least the object id. I created a class for Cryptography, only it generates "/" and this puts…
-
3
votes1
answer2417
viewsHow to insert an encrypted field into a table in Postgresql?
I wanted to know how to insert an encrypted field into a table in the database. To illustrate my doubt let’s assume that I have the following java class: package pessoa; public class Pessoa {…
-
3
votes2
answers352
viewsCode help (appears to be hexadecimal)
Hello, in my course had a joke, who could decipher the code would win a prize, I tried in hexadecimal, but I did not get anything. 51 44 52 20 59 44 20 57 44 52 20 4a 48 51 57 4c 4f 50 48 51 57 48…
-
3
votes1
answer1252
viewsAndroid Encryption and Encryption
I’m trying to learn how to use encryption to encrypt and decrypt messages. I’m with a class called Encripta which has the methods, the encryption works perfectly. My method of deciphering…