Questions tagged [des]

Data Encryption Standard (DES) is a cryptographic block cipher algorithm.

Data Encryption Standard (DES) is a cryptographic block cipher algorithm.

DES encryption uses a 56 bit key. It is insecure and can be broken in a few hours. It should not be used for new projects.

DES on Wikipedia

648 questions
4
votes
2 answers

DES encoding with security key C#

I know It's a probably common question but I cannot find answer anywhere. So I have byte array key and byte array value and I need to produce new 8 byte array that has been encrypted with DES in C#
emirkljucanin
  • 804
  • 1
  • 9
  • 20
4
votes
1 answer

Does DESKey preserve invalid parity bits?

According to DES specification, the last bit of each byte of the secret key is used for error detection (each byte should have odd parity). Hence the effective key length is 56 bits, not 64 bits. However, in many use cases these parity bits are not…
vojta
  • 5,591
  • 2
  • 24
  • 64
4
votes
0 answers

Using ntlm authentication in Nativescript ios platform

I am building an app with authenticates the user against a sharepoint site which uses NTLM authentication. I found the ntlm.js which has been patched for nativescript here https://github.com/hdeshev/nativescript-ntlm-demo. I have managed to get it…
tigerdi
  • 612
  • 7
  • 13
4
votes
1 answer

DES ECB encryption with PHP

https://www.tools4noobs.com/online_tools/encrypt/ gives "a67a318c98a0307502ba81caade2f3a9" as a DES ECB result for the key "1234567890abcdef" and payload "encrypt this". The PHP code echo bin2hex(mcrypt_encrypt( MCRYPT_DES, …
haba713
  • 2,465
  • 1
  • 24
  • 45
4
votes
3 answers

Decrypting TripleDES: Specified key is a known weak key and cannot be used

Why does this code return the weak key error? static public byte[] TDESDecrypt(byte[] toDecrypt, byte[] key, CipherMode mode = CipherMode.ECB, PaddingMode padding = PaddingMode.None) { TripleDESCryptoServiceProvider tdes = new…
Piero Alberto
  • 3,823
  • 6
  • 56
  • 108
4
votes
1 answer

EXC_BAD_ACCESS Code 2 on CCCrypt

I am trying to use DES encryption to encrypt passwords (Don't ask why DES, I know it's less secure). I am doing it for the first time in iOS, thus had to rely on another post about how to do it. When I run the encryption it returns null, same with…
0xC0DED00D
  • 19,522
  • 20
  • 117
  • 184
4
votes
2 answers

Python 2 - Decrypt Java's PBEWithMD5AndDES

This question is related to this one: Replicate Java's PBEWithMD5AndDES in Python 2.7 This was the answer of the question (Python code): from Crypto.Hash import MD5 from Crypto.Cipher import DES _password = 'q1w2e3r4t5y6' _salt =…
pihug12
  • 317
  • 3
  • 14
4
votes
1 answer

Convert char or string to bitset in c++

I'm doing an assignment on DES encryption and I can't seem to convert a string, let alone a char into a bitset. Can anyone show me how to convert a single char into a bitset in C++?
ShienXIII
  • 141
  • 1
  • 1
  • 9
4
votes
1 answer

Edit code sample to specify DES key value

I have a working code example that uses DES (see below), but I want to specify the key data to use. How can I edit the code sample to do this? import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import…
nitinkt
  • 67
  • 1
  • 3
  • 7
4
votes
1 answer

Why does PHP crypt function use DES encryption algorithm?

Given that the rule of thumb is to store salted hashes of the password string, not the encrypted form of it, why does the PHP crypt() function use the DES-based algorithms? Isn't DES an encryption algorithm? The manual says ... crypt() will return…
user1720897
  • 1,216
  • 3
  • 12
  • 27
4
votes
2 answers

DES decryption issue

I am using DES decryption with ECB mode. I am using the following code for decryption : NSString *token = @"kRAz86UoZd5tFKf0xv8TKg=="; NSString *key = @"meristem"; const void *vplainText; size_t plainTextBufferSize; NSData *EncryptData = [[NSData…
Sudha Tiwari
  • 2,499
  • 26
  • 50
4
votes
0 answers

Pkcs7 padding in java

Iam using TripleDes /cbc/pkcs7padding in C#.net to encrypt file. and i need to decrypt in java.In java am using DESede/CBC/PKcs5padding But the file is decrypted,but corrupted. *In java is it possible to use pkcs7padding? or any other solution to…
Nidhin T T
  • 298
  • 2
  • 5
  • 15
4
votes
2 answers

DES Initialization Vector in C#

I am trying to decrypt (using the DES algorithm) data that comes from a third party in C# code. There are plenty of examples here and elsewhere that have helped me out. The problem is that I don't know what to use for the 'initialization vector'.…
Mark M
  • 1,807
  • 2
  • 21
  • 40
4
votes
2 answers

C# Implementation of Unix crypt using System.Security.Cryptography

Overlooking the weak security provided by DES, I'm looking for a C# implementation of the Unix crypt() function that uses classes/methods in the .net framework's Cryptography namespace. I found…
Suraj
  • 35,905
  • 47
  • 139
  • 250
4
votes
1 answer

Encrypting on PHP but can't decrypt on C#

I have a test.php with the following: echo encrypt("something"); function encrypt($str) { $enc_key = "my key is 8 char long"; $ivArray=array( 0x10, 0x12, 5, 0x11, 0x23, 1, 0x55, 0x43 ); $iv=null; foreach…
Guapo
  • 3,446
  • 9
  • 36
  • 63