in reply to Encrypt using AES(block size 128-bit) in CBC
and the question you want to ask when you see shit like this is why are the line-breaks where they are.VendorTxCode=TxCode-1310917599-223087284&Amount=36.95&Currency=GBP&Des +cription=description&CustomerName=Fname Surname&CustomerEMail=customer@example.com&BillingSurname=Surname&Bill +ingFirstnames=Fname&BillingAddress1=BillAddress Line 1&BillingCity=BillCity&BillingPostCode=W1A 1BL&BillingCountry=GB&BillingPhone=447933000000&DeliveryFirstnames=Fna +me&DeliverySurname=Surname&DeliveryAddress1=BillAddress Line 1&DeliveryCity=BillCity&DeliveryPostCode=W1A 1BL&DeliveryCountry=GB&DeliveryPhone=447933000000&SuccessURL=https://e +xample.com/success&FailureURL=https://example.com/failur e
my $user_string = 'VendorTxCode=TxCode-1310917599-223087284&Amount=36. +95&Currency=GBP&Description=description&CustomerName=Fname Surname&Cu +stomerEMail=customer@example.com&BillingSurname=Surname&BillingFirstn +ames=Fname&BillingAddress1=BillAddress Line 1&BillingCity=BillCity&Bi +llingPostCode=W1A 1BL&BillingCountry=GB&BillingPhone=447933000000&Del +iveryFirstnames=Fname&DeliverySurname=Surname&DeliveryAddress1=BillAd +dress Line 1&DeliveryCity=BillCity&DeliveryPostCode=W1A 1BL&DeliveryC +ountry=GB&DeliveryPhone=447933000000&SuccessURL=https://example.com/s +uccess&FailureURL=https://example.com/failure';
With those two changes, I'm getting the right ciphertext. (It took a bit of doing but with block ciphers used in one of the chaining modes, if you're getting something that's correct up to a point, that tells you which block your mistake is in and you go from there...)
(and apparently, yes, they really are using 16-byte keys consisting entirely of bytes in the hex-digit range, which effectively means they're using 8-byte keys. Just for grins, I looked at their sample .php source and there's no provision for providing arbitrary keys and packing them. These people are screaming to get hacked.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Encrypt using AES(block size 128-bit) in CBC
by mikemc24 (Novice) on Jun 15, 2015 at 00:06 UTC | |
|
Re^2: Encrypt using AES(block size 128-bit) in CBC
by flexvault (Monsignor) on Jun 15, 2015 at 03:33 UTC | |
|
Re^2: Encrypt using AES(block size 128-bit) in CBC
by Anonymous Monk on Sep 08, 2015 at 08:10 UTC |