title: Turbopower Lockbox3 - Can I control initialization vector and padding for AES-256 encryption?
body: <p>In the process of moving from Delphi2007 to XE2, we are thinking about switching encryption libraries from DCPCrypt to Turbopower Lockbox 3.</p>
  
  <p>a) In DCPCrypt I have explicit control over the initialization vector. How would I set the IV in TPLB3?</p>
  
  <p>b) DCPCrypt has no padding, we pad the plaintext with zeroes before encryption. How does TPLB pad? We could still do it ourselves of course.</p>
  
  <h2>Test Vector</h2>
  
  <ul>
  <li>Cipher = AES-256;</li>
  <li>Chaining mode = CBC;</li>
  <li>Termination = C# style all-zero-padding;</li>
  <li>IV transmission = Full block prepended in the clear in the ciphertext stream.</li>
  <li>Key = 33d46cffa158533194214a91e712fc2b45b587076675affd910edeca5f41ac64 little-endien</li>
  <li>IV =  917fe226df8308f4d96c33304768354a</li>
  <li>Ciphertext = +kdTGzdV5KZIw8tv466nhQ== (base64)</li>
  <li>Plaintext = 'a_decent_text' (ansistring)</li>
  </ul>
  
  <p>Thanks
  Jan</p>