I'm running Windows Server 2k8 (maybe this is half the problem?) Anyway, I have different values in different languages Is the bluffish module anybody who can be trusted as a standard?
For the following examples, the value is password
and plain text 12345678
.
Blowfish
mode ECB
and Base64 encoded output
with an algorithm checked 2mADZkZR0VM =
. I am using this my point of reference, intelligent or otherwise.
b Use the following Perl code Crypt :: ECB
and MIME :: Base64
MIME :: Base64 ; Use Crypt :: ECB; $ Crypt = Crypt :: ECB- & gt; new; $ Crypt-> Padding (PADDING_NONE); $ Crypt-> Cipher ('bluffish') || $ Crypt-> Aristrating; $ Crypt-> Key ('password'); $ Enc = $ crypt-> Encrypt ("12345678"); Print encode _base64 ($ enq);
PADDING_NONE (which compares well with 'a.') With the output 2mADZkZR0VM =
. However, when the padding is set to PADDING_AUTO
, it outputs 2mADZkZR0VOZ5o + S6D3OZw ==
which has at least one bug in my mind, as in Plain text is 8 characters long and no padding required.
c. If I use Crypt :: Blowfish
below
#! Use C: \ perl \ bin crypt :: blowfish; Use MIME :: Base64; My $ key; My $ plain text; $ K = "password"; $ Plain text = "12345678"; My $ cipher = new crypt :: Blowfish $ key; My $ ciphertext = $ cipher- & gt; Encrypt ($ plain text); My $ encoded = encodbabs 64 ($ cifretext); $ Encoded print;
Then I get 2mADZkZR0VM =
which matches 'A'. up. Trouble with this module is however, that someone has to divide 8 byte chunks for encoding; It does not have any piece of its own.
d. If I use this source (which I did recently for a PHP ANSP project) then I get the same answer as 'A'. I am reliant on this code because it is in use in SSLeay and OpenSSL.
:: ECB results similar to PADDING_AUTO
with padding any
matches me with 2mADZkZR0VM =
which matches 'a' Have an account.
I have partly answered my question by writing this: I think that only the VB6 project has to modify the DI management code. And maybe the crypto :: suggest the author of the ECB
But the question remains: is there a reliable bluffish reference forum?
Your problem does not appear whether they apply Blowfish algorithms correctly "no padding" In type, they all produce similar results.
The question is whether 8-byte input should have a pad in all. The answer is very simple: PKCS # 7 requires that at least one byte padding is always added to the input. The reason for this is simple: on receipt, there should be a clear way to remove padding. In the case of PKCS # 7, the value of padding byte is always the number of bytes of padding that should be stripped by the recipient.
Therefore, when you decrypt the PKSCS 7, you see the last byte in the decrypted output, and remove many bytes from the block. Finally, without the padding block, the receiver usually looks at the last byte of the actual data, and whatever is in the byte, turn off several bytes (although it should probably tell you if there is a number 8 In any case, in order to assure correct operation, there should always be at least one byte padding. In your case, this means that the input is increased to 16 bytes instead of 8.
Comments
Post a Comment