<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-cite-prefix">On 5/20/14 6:30 PM, Brent Putman wrote:<br>
</div>
<blockquote cite="mid:537BD76D.1030204@georgetown.edu" type="cite">
<pre wrap="">
Maybe you can't init it with an IvParameterSpec, perhaps it requires
something different. </pre>
</blockquote>
<br>
Yeah, that seems like it might be it. I just looked for all
subclasses of AlgorithmParameterSpec, and I found GCMParameterSpec.
I just tried it in place of the IvParameterSpec, and it works for
Java 8 like so:<br>
<br>
<br>
<tt>byte[] iv = generateBytes(96/8);</tt><tt><br>
</tt><tt>////AlgorithmParameterSpec algParamSpec = new
IvParameterSpec(iv);</tt><tt><br>
</tt><tt>AlgorithmParameterSpec algParamSpec = new
GCMParameterSpec(128, iv);</tt><br>
<br>
<br>
So that looks promising. If that is the case, then the issue is
with Santuario. It probably needs to special case for GCM. I just
tested that mechanism with BC on Java 7 and it works also. So
perhaps that is the new "proper" way to do GCM, but BC doesn't
require it for historical reasons and Santuario is just lagging
behind and written to the older more lax BC way. At least I hope
so.<br>
<br>
</body>
</html>