Questions tagged [twofish]

Twofish is a symmetric key block cipher designed by Bruce Schneier and his team of cryptographers for the 1997 Advanced Encryption Standard contest.

Twofish is a symmetric key block cipher with a block size of 128 bits and key sizes up to 256 bits, designed by a team including Bruce Schneier, John Kelsey, Doug Whiting, David Wagner, Chris Hall, and Niels Ferguson, for the 1997 Advanced Encryption Standard contest. It was one of the finalists in the contest, but was not chosen for standardization by the National Institute.

Twofish's distinctive features are the use of pre-computed key-dependent S-boxes, and a relatively complex key schedule. One half of an n-bit key is used as the actual encryption key and the other half of the n-bit key is used to modify the encryption algorithm (key-dependent S-boxes). Twofish borrows some elements from other designs; for example, the pseudo-Hadamard transform (PHT) from the SAFER family of ciphers. Twofish uses the same Feistel structure as DES.

The Twofish cipher has not been patented and the reference implementation has been placed in the public domain.

31 questions
0
votes
1 answer

Java encryption TwoFish with Mode ECB

I am trying encrypt and encrypt using Twofish with ECB mode. I tried using the library "gnu.crypto.cipher.Twofish" but it not allow set the mode to ECB. We can use any library or code. Please help. Thanks.
toto
  • 1,180
  • 2
  • 13
  • 30
0
votes
1 answer

Genexus Encrypt64 TwoFish implementation

I am working on an environment that is in c# (not Genexus) and I need to encrypt data using the same implementatio of the TwoFish algorithm used by Genexus Encrypt64 method. I have the encryption key and examples for some inputs (unencrypted) and…
gmesorio
  • 443
  • 2
  • 7
  • 17
0
votes
1 answer

Using Serpent or TwoFish C# example?

For the past week, I've been looking for how to impliment either Serpent or TwoFish into C#. I've come across bouncycastle, which has no documentation on those, and this code project, which also doesnt have documentation, or a clear example. I was…
cipher
  • 1
  • 2
0
votes
1 answer

AES Library or code for C++

I'm supposed to overload the class below twice. Once I'm supposed to implement it with AES (Rijndael) and once with Twofish. However, I can't seem to find a simple implementation that allows to encrypt only a single block. The implementations I…
Aptitude
  • 23
  • 3
0
votes
1 answer

Input stream encryption

I'm struggling to get an encryption program to run as i'm trying to use Twofish. Is there a way to use cipherinputstream, or cipheroutputstream with an algorithm in a different package? or a way to put the Twofish algorithm into java.crypto.cipher?…
morgi
  • 11
  • 3
0
votes
1 answer

Mcrypt are very confusing

I was searching for twofish encryption then I found mcrypt and they said I should use the cipher: MCRYPT_TWOFISH256 (because I want 256 bit key size) But it didnt work and I checked my version and the version to use MCRYPT_TWOFISH256. THIS maked me…
tor
  • 191
  • 11
0
votes
0 answers

Go - Decoding the password encoded by twofish

I'm using code.google.com/p/go.crypto/twofish and I want to decrypt password, which I get from database. The password was encrypt by PHP and it's encoded by base64. In Go, I decode by base64, convert to []byte and I tried decrypt it, but something…
JakubKubera
  • 426
  • 1
  • 3
  • 19
0
votes
2 answers

Twofish password encryption in Silverstripe?

is there a way how to use Twofish algorithm to hash passwords in Silverstripe? It doesn't look that it's natively supported. There is a way how to extend PasswordEncryptor probably. Thanks!
Martin Rázus
  • 4,615
  • 5
  • 30
  • 33
0
votes
1 answer

Twofish cipher key generation

I'm trying to figure out how Twofish cipher expanded key is generated. For now, I have figured out that firstly one part of the key is generated, and used for whitening, and then in each round 2x32bit key part is generated. The first part of the…
Kobe-Wan Kenobi
  • 3,694
  • 2
  • 40
  • 67
0
votes
1 answer

Example code for blowfish encryption

I need to encrypt a char* string in C using blowfish or twofish in Windows. I can't find a straight forward solution for that. I don't want to install something like OpenSSL; I need it be a standalone as possible. Unfortunately Googling for C code…
Ariyan
  • 14,760
  • 31
  • 112
  • 175
0
votes
1 answer

Delphi DEC Twofish Encryption and server-side decryption in PHP

I have to encrypt string in Delphi with Twofish/CBC algorithm, send it to server and decrypt there. I've tested the code below, and B64 encoding/decoding process works, however I'm stuck at cipher encryption/decryption. I am using DEC 5.2 for…
rsrx
  • 1,433
  • 1
  • 13
  • 25
0
votes
3 answers

Are blowfish and twofish encrypted byte by byte?

I am receiving packets through network. But some of those packets have dynamic length, so second byte has a 2 bytes long WORD that contains length. So I receive the packet number first, then receive all according to the length. Everything is okay…
deniz
  • 2,427
  • 4
  • 27
  • 38
-1
votes
1 answer

writing php MCrypt twofish for c# bouncycastle

I'm learning how to use the BouncyCastle c# cipher library for doing encryption. I'm not looking to send messages so I'm not thinking about security etc. I have written my c# code in Visual Studio. Here is the problem. I have encrypted the text…
Andy Hyde
  • 21
  • 5
-2
votes
1 answer

Encryption/Decryption with Twofish

I am trying encrypt and decrypt using TWOFISH. I received the error: Exception in thread "main" java.security.NoSuchAlgorithmException: twofish KeyGenerator not available My code: public class TWOFISH { public static byte[] encrypt(String…
toto
  • 1,180
  • 2
  • 13
  • 30
-2
votes
1 answer

How to change Cryptography's Method at TLS protocol on Localhost(XAMPP)?

Hi =) I Want to ask a question about Cryptography.. How to change Cryptography's Method at TLS protocol on Localhost(XAMPP) ? I want to use Twofish as Simmetric Cryptography, and RSA for PKC.... Thank You =)