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
-
3
votes2
answers798
viewspython - Delete string end characters
Is there any way to delete characters at the end of a string in python? For example: a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" B = "ABCDEFGH" I need string "a" to be the same size as "b," so that’s possible?…
-
3
votes2
answers928
viewsTypeerror: Incorrect padding
Guys I’m trying to decrypt AES, only I’m facing the following mistake: Traceback (Most recent call last): File ". /teste2.py", line 190, in main() File ". /teste2.py", line 186, in main…
-
3
votes0
answers940
viewsDifficulty implementing password encryption with Spring Boot
By the title you can see that it is a Spring Boot project, and being a Spring Boot project many things already come configured by Frameworks, but do not know regarding the implementation of password…
-
3
votes1
answer146
viewsHow to encrypt a C-drive?
First to locate them, I have an idea of security, and to be able to put this idea into practice I would need to learn how to encrypt a USB stick. The idea is that the USB stick works as a 'key', and…
-
3
votes1
answer119
viewsHow to upload safely?
How to do upload/download of a file on an FTP server without this server’s login information being visible in the code? For example, I nay I want to do the following: string FTPhost =…
-
3
votes1
answer73
viewsCryptographic test diverging from class execution
I made my class in java for encryption using AES. However I went to test it on this site here: http://aesencryption.net/ Java class: text: test key: abcdefghijklmno1 outworking:…
-
3
votes2
answers111
viewsWhy is the last letter of my code replaced by a question mark "?"?
The teacher asked for a C# code as a term paper that encrypts a text from a file. The code isn’t polished yet or anything, I’m just doing the raw then I’ll add more things, but my problem is that…
-
3
votes0
answers138
viewsJava equivalent C# encryption
I have the method below in C# and I need to do something equivalent in JAVA, but I’m not getting it. Could you help me? private const string chave = "eMbARaLhaDo"; public static string…
-
3
votes1
answer554
viewsWhat does the f = Fernet(key) code represent when using the cryptography.Fernet library?
The program consists of encrypting a message with a key and then decrypting. from cryptography.fernet import Fernet key = Fernet.generate_key() f = Fernet(key) token = f.encrypt(b"my deep dark…
-
3
votes2
answers946
viewsEncryption with bcrypt + random salt
I have a simple question about encryption using bcrypt with salt. When in old projects I used md5, to check in a login form if the user typed the correct password and authenticate, it was customary…
-
3
votes1
answer112
viewsWhat is the safest way to display ID (primary BD key) on web pages?
I am in the development of a web application, which would be necessary in some cases to make available in HTML (for JS to interact) ID of user posts, ID of comments and others... Example: <div…
-
3
votes0
answers190
viewsWhat is the difference between the terms X.509 and PKCS#7 in digital certificates?
Via a Webapi . Net 4.6.1 I am integrating with a service that requires data to be sent on a connection TLS 1.2 duly digitally signed using the standard PKCS#7, but when checking an example of…
-
3
votes1
answer123
viewsWhy can’t I hash the password in my Seed method?
I’m trying to use my method seed below to create a user in the database when it is created: protected override void Seed(CodingCraftMod1Ex4AuthMembershipContext context) { string password =…
-
3
votes1
answer486
viewsIs it worth encrypting database?
Recently I’ve been having the curiosity about the utility of encrypting all fields of all tables in a database. The idea is this: Create two Crets (one in the bank and one in the application); The…
-
3
votes2
answers1055
viewsElaboration of cipher in python
Hey, guys, I’m new here and in the programming world, so any criticism is welcome. I have a problem with this cesar cipher I’ve been trying to do. They could point out possible errors, and ways to…
-
2
votes1
answer194
viewsHow to access script control with Jekyllcms
I’m using the Jekyllcms to develop a CMS (Content Management System), but as I don’t know him very well and even after reading the documentation, I find it difficult to "hide" some data that I use…
-
2
votes1
answer652
viewsRsacryptoserviceprovider - Decrypt
Using RSA encryption, I pass the encrypted data from client to the server decrypt. When trying to decrypt, it returns an exception CryptographicException with the message: Specified invalid flags. I…
-
2
votes2
answers756
viewsPossible SHA256 return 128bytes after signing?
I’m using the following code to get my certificate and sign my Cnpjs, but I’m using the SHA256 algorithm, but it’s returning 128bytes. Can anyone tell me what’s wrong? Follows the Code: Dim data =…
-
2
votes0
answers39
viewsPHP source encryption (System)
I need to deploy a system I created in PHP, but I would like to protect my system somehow. It is possible to encrypt my system (PHP) so that more users do not have access to the source code and end…
-
2
votes1
answer97
viewsProblem in condition to handle string
It was only supposed to work with lower-case letters and when it arrived at symbols it did not change, but they are being changed. What’s the problem? #include <stdio.h> int main() { char…
-
2
votes1
answer278
viewsPassword encryption problem (PHP)
I’m making a Pet Shop system and the problem is this: the customer makes the registration, and the password will be encrypted to the bank, but when the login is made it is an error. Example: the…
-
2
votes1
answer2571
viewsHow to securely encrypt and decrypt PHP data?
I need to write confidential data in the database, but which can be read later (decrypt).
-
2
votes1
answer144
viewsHow does the Bennett & Brassard protocol work?
I’m studying a matter of quantum cryptography and I’m not understanding the workings of the Bennett & Brassard protocol, it all seems random and meaningless... Even reading other things on the…
-
2
votes1
answer1526
viewsHow to validate a signature with a private key?
I receive an HTTP request that comes in the HEADER a signature (SHA1). I own, stored in a String, a private key. I need to generate the signature between the BODY of the HTTP request and my key and…
-
2
votes1
answer139
viewsC# File encryption
I want to send files to friends but I want to make sure no one can see their content. I would like an example to perform C file encryption#.
-
2
votes1
answer1936
viewsEncryption in the sqlite
I am needing to store some data in Sqlite, but this data needs to be encrypted, and when the user needs it, decrypted. What’s the best way to do that?
-
2
votes2
answers402
viewsOn the RSA cryptography
Hello, RSA encryption generates public.key and private.key However, if I make some application in java, and the "hacker" get these Keys, it can extract the content. You can camouflage these…
-
2
votes1
answer183
viewsHow to encrypt in the Java Web project
Can someone pass me some material with the safest way to make the security of a system? I want to put this in the user registration in my JSF project with Primefaces 5.1 for when it is registered…
-
2
votes1
answer1701
viewsC# - Use of A3 Certificate (Card Reader) + Windows Service
Good morning to all. I created a windows service (C#) where I sign XML from NFC-es using Flexdocs DLL. Using A1 certificate everything works normally, but when using A3, the frame where I must enter…
-
2
votes0
answers695
viewsHow does data encryption work in Firebase?
I am developing an Android messaging application using Firebase and I realized that it will be necessary to protect the user data and the messages exchanged by them, because at the moment it is…
-
2
votes1
answer52
viewsHow is the encryption of a Securestring made and stored?
The class SecureString is used to represent a text that must be kept confidential in memory (passwords, card numbers, balances, etc.), and carries out its correct deletion from memory when said text…
-
2
votes1
answer2046
viewsDecrypt MD5
I need to change this code to decrypt the data with it encrypted: public static string MD5HashCrypt(string text) { MD5 md5 = new MD5CryptoServiceProvider(); //compute hash from the bytes of text…
-
2
votes1
answer593
viewsHow do function to encrypt password in C#?
How do function to encrypt password in C#? I want to take the password attribute and encrypt it. public String gravarCadastro(Cadastro cadastro) { string sql; int retorno; string resp; try {…
-
2
votes2
answers251
viewsPython code using HMAC library
I’m doing a paper on cryptography for college using HMAC along with SHA256, and I’d like to understand what this code does on each line, I’m a little confused. #!/usr/bin/env python3 import hashlib…
-
2
votes1
answer417
viewsHash and Encryption Algorithms
I’m doing a paper on the difference between Hash and Cryptography. For me it’s easier to talk about Hash and cite examples since I usually use SHA1 and MD5, but talking about cryptography is…
-
2
votes1
answer91
viewsWhen to use encryption when developing for mobile?
I am studying and assembling projects for mobile devices, and I always come across dozens of data transmissions, some important others not 1)I wonder if it is convenient to encrypt all the data…
-
2
votes1
answer1848
viewsConvert String to MD5 with Flutter
I have an application in Flutter,and I’m trying to convert my Password to MD5 on the login screen, I found some other methods but none served me. I’m trying to use final md5 = new MD5._() to convert…
-
2
votes1
answer116
viewsIs Sqlserver’s HASHBYTES() function cryptographically secure?
The company I work today she has much of the programming done in the database through procedures and was seeing how the creation of the hash of passwords and their persistence in the bank. I…
-
2
votes3
answers313
viewsLogin problems using the crypt() function in PHP
I’m returning to the world of PHP after a long winter. I took an example of user registration that uses MD5 as encryption standard and now I’m struggling to log in a test user because I need to…
-
2
votes2
answers990
viewsHow to encrypt GET and copy the parameter
I have an e-mail from feedback that is sent to a user after the service is completed. This email has 5 links, where each is the respective service note (from 1 to 5). I want to direct to the update…
-
2
votes1
answer1660
viewsC# AES encryption with MD5
I’m doing a college paper where I need to encrypt a string with AES and Md5. When I do the encryption, returns the normal result (I think), but when I go decrypt, returns the following error:…
-
2
votes1
answer202
viewsEncrypt in UWP and Decrypt in Web API
I’m trying to encrypt a string in a UWP (Universal Windows Platform) application and decrypt the string in a Web API application. The problem is that I can’t find/modify an algorithm common to both…
-
2
votes2
answers295
viewsMigrate PHP function from mcrypt to Openssl
I have a PHP function that uses mcrypt. The problem is that PHP 7.2 no longer accepts mcrypt... Does anyone know how to redo it to get the same result using Openssl? function Encript($Val, $chave){…
-
2
votes0
answers156
viewsECDH between C# and javascript
I’m creating a web API and need to implement ECDH for end-to-end encryption. On the server side I have a C# application and on the client side a javascript application. I can switch keys, generate…
-
2
votes1
answer102
viewsProblems with C++ encryption
I’m making an encryption program that works as follows: It will read a string and then add to each character a respective prime number. Example: a(+2) b(+3) c(+5) d(+7) e(+11) = c e h k p In this…
-
2
votes1
answer200
viewsFunction to encrypt and decrypt in PHP 7+
I own the functions below: function enCript($string, $key) { $result = ''; $test = ""; for($i=0; $i<strlen($string); $i++) { $char = substr($string, $i, 1); $keychar = substr($key, ($i %…
-
1
votes1
answer291
viewsObfuscate code in Actionscript 3.0 in SWF Flash?
I found this program called Sothink SWF Decompiler reverse engineering in archives .SWF converting them to .FLA, leaving, even, all the programming of the file visible and open to the user. Is there…
-
1
votes1
answer161
viewsPHP crypt password
I have two curiosities about encryption of passes, I have this code: 1- $mainpass = "test123"; $md5pass = md5($mainpass); $sha1pass = sha1($md5pass); $cryptpass = crypt($sha1pass, 'st'); echo…
-
1
votes1
answer70
viewsDecryption problem
I have a Mysql session with PHP of a somewhat advanced PHP encryption using Sha512, I’m having trouble reversing it to decrypt the data. function gen_token($pass, $salt) { $salt = strtolower($salt);…
-
1
votes1
answer272
viewsSearch the database with encrypted data
I own a database where the entered data is encrypted through a function written in PHP, this function encrypts and decrypts. I need to search this table. For example, I search for "BRAZIL", but in…