-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b149
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8197082 | 8u192 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
JDK-8189461 | 8u172 | Ivan Gerasimov | P4 | Resolved | Fixed | b03 |
JDK-8184366 | 8u162 | Ivan Gerasimov | P4 | Resolved | Fixed | b02 |
JDK-8177485 | 8u161 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
JDK-8182955 | 8u152 | Ivan Gerasimov | P4 | Resolved | Fixed | b06 |
JDK-8182112 | 8u151 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
JDK-8192383 | emb-8u161 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
JDK-8184526 | emb-8u151 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
JDK-8178987 | 7u171 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
JDK-8181966 | 7u161 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
JDK-8193974 | openjdk7u | Ivan Gerasimov | P4 | Resolved | Fixed | master |
JDK-8179208 | 6u181 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
JDK-8182232 | 6u171 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
while looking at ISO10126Padding I noticed a few minor optimizations are possible:
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8u40-b25/com/sun/crypto/provider/ISO10126Padding.java?av=f
unpad() - there is already a int cast done to this value:
104 int start = off + len - ((int)lastByte & 0x0ff);
can be changed into "int start = off + len - padValue;"
padWithLen() - we can request one byte less from PRNG and copy one less:
71 byte[] padding = new byte[len];
72 SunJCE.getRandom().nextBytes(padding);
73 padding[len-1] = paddingOctet;
74 System.arraycopy(padding, 0, in, off, len);
byte[] padding = new byte[len-1];
SunJCE.getRandom().nextBytes(padding);
System.arraycopy(padding, 0, in, off, len-1);
in[off+len-1] = paddingOctet;
- backported by
-
JDK-8177485 Minor optimizations to ISO10126PADDING
-
- Resolved
-
-
JDK-8178987 Minor optimizations to ISO10126PADDING
-
- Resolved
-
-
JDK-8179208 Minor optimizations to ISO10126PADDING
-
- Resolved
-
-
JDK-8181966 Minor optimizations to ISO10126PADDING
-
- Resolved
-
-
JDK-8182112 Minor optimizations to ISO10126PADDING
-
- Resolved
-
-
JDK-8182232 Minor optimizations to ISO10126PADDING
-
- Resolved
-
-
JDK-8182955 Minor optimizations to ISO10126PADDING
-
- Resolved
-
-
JDK-8184366 Minor optimizations to ISO10126PADDING
-
- Resolved
-
-
JDK-8184526 Minor optimizations to ISO10126PADDING
-
- Resolved
-
-
JDK-8189461 Minor optimizations to ISO10126PADDING
-
- Resolved
-
-
JDK-8192383 Minor optimizations to ISO10126PADDING
-
- Resolved
-
-
JDK-8193974 Minor optimizations to ISO10126PADDING
-
- Resolved
-
-
JDK-8197082 Minor optimizations to ISO10126PADDING
-
- Resolved
-
- relates to
-
JDK-8170762 Document that ISO10126Padding pads with random bytes
-
- Resolved
-