/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 5008156
* @run main NISTWrapKAT
* @summary Verify that the "AESWrap" key wrap cipher work as
* expected using NIST test vectors.
* @author Valerie Peng
*/
public class NISTWrapKAT {
"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f";
"00112233445566778899aabbccddeeff000102030405060708090a0b0c0d0e0f";
"1fa68b0a8112b447aef34bd8fb5a7b829d3e862371d2cfe5";
"96778b25ae6ca435f92b5b97c050aed2468ab8a17ad84e5d";
"031d33264e15d33268f24ec260743edce1c6c7ddee725a936ba814915c6762d2";
"64e8c3f9ce0f5ba263e9777905818a2a93c8191e7d6e8ae7";
"a8f9bc1612c68b3ff6e6f4fbe30e71e4769c8b80a32cb8958cd5d17d6b254da1";
"28c9f404c4b810f4cbccb35cfb87f8263f5786e2d80ed326cbc7f0e71a99f43bfb988b9b7a02dd21";
// setup the key encryption key and the to-be-wrapped key
// first test WRAP with known values
// need to add offset since BigInteger may pad "0x00" in the beginning
throw new Exception("Wrap failed; got different result");
}
}
// then test UNWRAP and compare with the initial values
throw new Exception("Unwrap failed; got different result");
}
}
// only run the tests on longer key lengths if unlimited version
// of JCE jurisdiction policy files are installed
}
}
}
}