Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > BOOK: Beginning Cryptography with Java
|
BOOK: Beginning Cryptography with Java
This is the forum to discuss the Wrox book Beginning Cryptography with Java by David Hook; ISBN: 9780764596339
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Cryptography with Java section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 7th, 2008, 08:06 AM
Registered User
 
Join Date: Aug 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Inline IVs - do i understand correctly?

"Beginning Cryptography with Java" is a god-send of a book! i appreciate that authors have to be economical with the number of words they use; and that sometimes leads to the precise meanings of things being a little too subtle to grasp on a first-pass reading.

in the "Inline IVs" section of chapter 2 (pg 28) the book uses jargon ("out-of-band") that is a little ambiguous to me:
 
Quote:
quote:...the JCE assumes that the IV will be passed as an out-of-band parameter...

i'm assuming that the "band" referred to in this particular use of "out-of-band", translates to: "the method in which the encryption functionality is taking place". more specifically - in the context of the sample code - i'm assuming "in-band" would be the cipher.update() method; and "out-of-band" would be the cipher.init() method. have i got that right?

that same section also starts talking about "the stream" all of a sudden when it hadn't mentioned anything about a stream before:
    
Quote:
quote:...people also write the IV out at the start of the stream...

at first i thought it was talking about one of the java language's i/o stream classes. i was looking for the use of some i/o stream object in the sample code but there isn't any and that confused the heck out of me. so now i'm assuming "the stream" means, "the stream of bytes - in the form of byte arrays - passed into and out of cipher.update() and cipher.doFinal()". do i understand that correctly?

actually, as i type out this post it's all starting to make sense (i think)! am i right in assuming that:
Quote:
quote:...write the IV out at the start of the stream...
equates to this line in the sample code?:
   
Code:
   int ctLength = cipher.update(ivBytes, 0, ivBytes.length, cipherText, 0);

and does:
Quote:
quote:...read past it before attempting to reconstruct the message...
equate to this line in the sample code?:
Code:
   System.arraycopy(buf, ivBytes.length, plainText, 0, plainText.length);
thanks in advance for your replies.

 
Old August 7th, 2008, 07:34 PM
dgh dgh is offline
Wrox Author
 
Join Date: Aug 2005
Posts: 206
Thanks: 0
Thanked 20 Times in 20 Posts
Default

Yes, you have understood correctly.

Regards,

David






Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting inline elements richardnspence XSLT 6 January 30th, 2008 09:59 AM
I don't understand... jmsherry ASP.NET 2.0 Basics 17 July 23rd, 2007 12:28 PM
inline PDF naheedv Pro JSP 3 June 8th, 2007 01:34 AM
I still do not understand aude_poullain ASP.NET 1.0 and 1.1 Basics 2 February 7th, 2007 09:11 PM
Inline Javascript. rupen Javascript How-To 1 July 20th, 2005 12:27 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.