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
5
votes
2 answers

Select different padding modes in OpenSSL commands

I wrote a Java Card applet to do DES encryption/Decryption. The source code of my applet (If you want to use it, consider that Mr Bodewes found some bugs in this source code (those are mentioned in the comments under his answer. So fix it and then…
Ebrahim Ghasemi
  • 5,850
  • 10
  • 52
  • 113
5
votes
2 answers

Howto display or view encrypted data in encrypted form?

In the Wikipedia Article on Block Cipher Modes they have a neat little diagram of an unencrypted image, the same image encrypted using ECB mode and another version of the same image encrypted using another method. At university I have developed…
Brian Gianforcaro
  • 26,564
  • 11
  • 58
  • 77
5
votes
4 answers

Replicate Java's PBEWithMD5AndDES in Python 2.7

If it's not immediately obvious, let me start by saying I am not a crypto person. I have been tasked with replicating the behavior of Java's PBEWithMD5AndDES (MD5 digest with DES encryption) in Python 2.7. I do have access to Python's cryptography…
Tebbe
  • 1,372
  • 9
  • 12
5
votes
2 answers

IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher

I have the below method: public String decrypt(String strToBeDecrypted) { try { strToBeDecrypted = URLDecoder.decode(strToBeDecrypted, "UTF-8"); DESKeySpec desKeySpec = new DESKeySpec(key); SecretKeyFactory keyFactory =…
5
votes
4 answers

Which iteration rules apply on crypt() using CRYPT_EXT_DES?

My testcase as follows: echo crypt('string', '_....salt');//error echo crypt('string', '_A...salt');//fast echo crypt('string', '_AAAAsalt');//slow Explanation as stated at http://www.php.net/manual/en/function.crypt.php: CRYPT_EXT_DES - Extended…
mgutt
  • 5,867
  • 2
  • 50
  • 77
5
votes
2 answers

How to mimic php crypt() on NODE.JS

Please help with php -> javascript(node.js) conversion $key = crypt($key, $salt); I'm rewriting php script with node.js, and I got stuck with hash signature generation in php, which is made using crypt() function with salt matching "CRYPT_EXT_DES"…
bbbonthemoon
  • 1,760
  • 3
  • 19
  • 31
5
votes
2 answers

Simple Discrete event simulation library (C++) for process/task scheduling?

Simple question: I built a quasi-processor simulator that takes a precedence graph, determines priorities (and "ready" instructions), schedules the tasks on available functional units, etc. Pretty much a very basic simulator. But I realized I…
user770901
  • 414
  • 1
  • 4
  • 15
4
votes
7 answers

How should I create my DES key? Why is an 7-character string not enough?

I'm having a bit of difficulty getting an understand of key length requirements in cryptography. I'm currently using DES which I believe is 56 bits... now, by converting an 8 character password to a byte[] my cryptography works. If I use a 7 digit…
djdd87
  • 67,346
  • 27
  • 156
  • 195
4
votes
2 answers

Generating MAC by encrypting data

I hope this question will not get closed as not constructive. I've been banging my head to the wall to solve this and still got nowhere. so, this is my last hope: Question is basically about generating the MAC field of an ISO 8583-Rev 93 message. I…
Kamyar
  • 18,639
  • 9
  • 97
  • 171
4
votes
1 answer

Encode / Decode RealVNC password

I'm trying to write C# application that can remotely change the RealVNC password on another box. What works currently is that I can pull a password from a box that has already been changed, store it as a hex string, and then send it to another box…
DrkNite72
  • 41
  • 1
  • 4
4
votes
3 answers

Confused about how Android Encryption works

Okay, I am working on an application and I want to store a file on the user's SD Card, but I want the file encrypted. I've researched several sites that use the DES encryption to encrypt files and data, but I am confused about something. All the…
Icemanind
  • 47,519
  • 50
  • 171
  • 296
4
votes
1 answer

DES Encryption in Python

The pycryptodome is working fine, but I'm getting an error message. Here's my code: from Crypto.Cipher import DES key = 'hello123' def pad(text): while len(text) % 8 != 0: text += '' return text des = DES.new(key,…
Raj
  • 41
  • 1
  • 1
  • 4
4
votes
2 answers

Why does checking if a HashMap has a certain value take very long to execute within a for loop?

I am working with meet-in-the-middle attack on Double-DES. I have implemented the DES encryption/decryption and done the encryptions and now I would like to perform a MITM attack on the Double-DES in order to find the keys. The way I am trying to…
Bab
  • 433
  • 5
  • 12
4
votes
1 answer

How to encrypt a serialized object with DES(CBC mode) in Java?

I was reading this article about serialization. It was the first time I saw encrypting a serialized object. I'm trying to encrypt some serializable object and then save them into a file. But the article's example uses ECB mode which is known to…
Antonys
  • 41
  • 1
  • 3
4
votes
0 answers

How is a DES key generated from passphrase in C?

(Not to be confused with the DES algorithm subkey generation) (edit: more examples) Explanation of problem: I'm doing this as part of a school assignment where I'm required to recode parts of OpenSSL in C, specifically those pertaining to PKI…
izcet
  • 49
  • 1
  • 7
1 2
3
43 44