Commit Graph

1640 Commits

Author SHA1 Message Date
zzz
801ca47a0c add Koblitz curves for testing 2013-09-13 00:49:10 +00:00
zzz
43f5062169 SSLEepGet: Move all certificates to certificates/ssl, in preparation
for other certificate uses by SU3File
2013-09-12 21:47:25 +00:00
zzz
7ab4dd7f4b KeyStoreUtil:
- Overwrite check in createKeys()
  - New getCert(), getKey()
  SU3File:
  - Store generated keys in keystore
  - Get private key for signing from keystore
2013-09-12 20:22:30 +00:00
zzz
71c0104236 Add base algorithm type in prep for RSA 2013-09-12 18:23:28 +00:00
zzz
a608d21571 KeyStore: change keygen default to RSA 2048 (ticket #1017)
fix key length setting
2013-09-12 14:55:16 +00:00
zzz
935ddaa0b2 fix default expiration 2013-09-12 14:41:25 +00:00
zzz
945e7b75fd Crypto - prep for using certificates in SU3File:
Consolidate KeyStore code from SSLEepGet, I2CPSSLSocketFactory,
  SSLClientListenerRunner, and RouterConsoleRunner into new
  KeyStoreUtil and CertUtil classes in net.i2p.crypto (ticket #744)
2013-09-12 14:27:16 +00:00
zzz
a8a21ea7ce propagate from branch 'i2p.i2p' (head 6667c4a9f9fcc0705e407006d1933dd31942ffb2)
to branch 'i2p.i2p.zzz.ecdsa' (head bf746450400fc5ffa0e727ed0cd6a3966f6ce51f)
2013-09-10 13:03:40 +00:00
zzz
a3ea1f9429 remove static log 2013-09-10 12:23:45 +00:00
zzz
78d4b6d8a7 - Simple DirKeyRing backend for testing 2013-09-09 19:46:24 +00:00
zzz
3e3399adc6 - Add Java key import to SigUtil
- Import priv key to SU3File in Java encoded format instead of I2P format
  - New KeyRing stub
2013-09-09 00:49:14 +00:00
zzz
1e554dd0fe - Move I2P-to-Java DSA key conversion from DSAEngine to SigUtil
- Add Java-to-I2P DSA key conversion to SigUtil
  - Export keys from SU3File in Java encoded format instead of I2P format
2013-09-08 21:47:48 +00:00
e65289cd0d Document logCloseLoop() methods 2013-09-08 15:23:09 +00:00
zzz
27936fce04 cache key conversion 2013-09-08 13:06:30 +00:00
592680302f make the logCloseLoop() methods members of the Log class
so they can be used everywhere
2013-09-08 12:55:05 +00:00
zzz
55318cf14b Crypto: Set file modes on written keys; don't overwrite existing files 2013-09-08 11:57:15 +00:00
zzz
83ead0c304 - SU3File: Readahead to get sigtype on verify, as we need the hash type 2013-09-07 20:24:40 +00:00
zzz
38ec55bc72 - DSAEngine: Implement raw ECDSA sign/verify
- SU3File: Implement keygen
2013-09-07 19:37:02 +00:00
zzz
c4f97ed65e - DSAEngine: Start of support for signing hashes with other SigTypes
- KeyGenerator: Measure sign and verify separately in test
 - SU3File: Start to support other SigTypes
 - SigType: Add getHashInstance(), fix hash length for ECDSA_SHA256_P192
 - SHA1Hash: Add no-arg constructor
2013-09-07 18:12:19 +00:00
zzz
78a426e9ac * Crypto: Don't use "short exponent" on faster platforms.
Rebuild router identity if key length doesn't match setting.
   This affects RI and LS encryption keys, and DH and YK.
   Faster = 64 bit with working jbigi, non-ARM, non-GNU (for now)
   Override default with crypto.elGamal.useLongKey=true/false
   LS key is built at client startup (Dest key unused)
   This will churn most of the RIs at the release.
 * SystemVersion: Add isARM()
2013-09-07 13:43:28 +00:00
zzz
928b4bbbe5 - genSpec: fallback to BC provider 2013-09-06 13:53:15 +00:00
zzz
d27c465371 - KeyPairGen: Catch ProviderException, fallback to BC provider 2013-09-06 13:30:47 +00:00
zzz
4d62f63c71 * Start of ECDSA branch:
- Add ECConstants which looks for named curves and falls back to
     explicitly defining the curves
   - Add SigUtil with converters from Java formats (ASN.1, X.509,
     PKCS#8) to I2P formats for Signatures and SigningKeys
   - Move ASN.1 converter from DSAEngine to SigUtil, generalize
     for variable length, add support for longer sequences,
     add more sanity checks, add more exceptions
   - Attempt to add BC as a Provider
   - Add parameters (curve specs) to SigTypes
   - Add support for ECDSA to DSAEngine and KeyGenerator
   - Add KeyGenerator main() tests
   - More javadocs

  All is Java 1.5 compatible but the actual algorithms, curves,
  and other support aren't necessarily present in any JVM.
  Todo: More tests, more fallbacks for various JVMs
2013-09-06 12:04:22 +00:00
zzz
f4039b085a * Crypto: SigType tweaks, prep for parameters, show type in toString()
* NativeBigInteger: Don't use native for negative arguments, which aren't supported in jbigi.c
2013-09-06 11:40:50 +00:00
zzz
caead8a3a4 consolidate maxMemory() calls 2013-09-03 11:37:36 +00:00
zzz
1933e6239b * SusiDNS: Don't require last subscription to be terminated by newline (ticket #1000) 2013-08-30 10:21:57 +00:00
zzz
4802b1e2cd propagate from branch 'i2p.i2p.0971' (head 6cb629b61e0177deda1e539b2f85a2473f3af7fb)
to branch 'i2p.i2p' (head 8e86ef70afbbbbdc2db06cec34f17dedd528c7e7)
2013-08-10 17:06:17 +00:00
zzz
06d2db0046 0.9.7.1 2013-08-10 16:00:46 +00:00
zzz
04e6beb43c javadoc, log, comment, and su3file help tweaks 2013-07-30 22:05:46 +00:00
zzz
4340f70d72 * Signatures:
- Prep for new signature algorithms; new SigType enum;
     Signature, SigningPublicKey, SigningPrivateKey store type
   - New Hash384 and Hash512 classes
   - Remove length field in SimpleDataStructure
   - New SU3File generator/verifier/extractor
2013-07-29 13:49:05 +00:00
zzz
be753d7a1a * Addresses: Treat RFC 4193 addresses fc00::/7 as local 2013-07-28 12:52:41 +00:00
zzz
a7485ab5a3 * I2CP:
- Oops, must enforce property length limits even when inside router JVM
     as the properties are serialized for signing.
2013-07-21 20:17:42 +00:00
zzz
1b42d99e66 * Console: Fix /peers table summary alignment
* I2CP:
   - Don't NPE when loglevel=warn
   - Don't enforce property length limits when inside router JVM
 * I2PSnark: Log uncaught error in ThreadedStarter to router log
 * I2PThread: Log uncaught error to wrapper log
2013-07-21 14:04:27 +00:00
d709f46183 Update unit test 2013-07-20 18:45:19 +00:00
zzz
a87fc68cfd propagate from branch 'i2p.i2p.zzz.ipv6' (head 5c147c6e394fae03752dcf497923a90e3f2db529)
to branch 'i2p.i2p' (head 7af6987d5546664f76589afe0cbeeb780f4b5d58)
2013-07-20 12:59:03 +00:00
zzz
90cc71d14d propagate from branch 'i2p.i2p.zzz.test2' (head d80f8632ef0a2aa350eee9a38ba6a4c56471f5bc)
to branch 'i2p.i2p' (head e8b712c826e44211217f06eb3a4da2703323a42f)
2013-07-20 11:53:41 +00:00
zzz
554a3a6b0e * PRNG:
- Don't delay the refiller if we need more (don't limit max output)
   - Add FortunaRandomSource.main() to output to stdout for testing e.g. with dieharder
2013-07-19 21:31:25 +00:00
zzz
3b46acc285 * I2CP client session - improvements after review:
- Move more cleanups to finally block
   - Bounded wait
   - Don't ignore InterruptedExceptions, wrap in I2PSessionException and throw
   - More finals
   - Synch tweaks
2013-07-17 18:56:26 +00:00
zzz
20e152e79a 0.9.7 2013-07-15 14:15:43 +00:00
zzz
71038c311f * Translations:
- New varargs method in Translate
   - New TranslateReader to translate static files on-the-fly using _("") tagging
   - Tag proxy error pages for TranslateReader
   - Drop static translated proxy error pages
   - Add new i2ptunnel bundle for the proxy alone, shipped in the jar
   - Use TranslateReader in HTTP proxy for error pages
   - Move HTTP proxy strings from the web *war) to proxy (jar) bundle so they will be loaded
   - Initial translations created by msgmerge from i2ptunnel and routerconsole po files, un-fuzzied
2013-07-13 19:58:11 +00:00
zzz
f3c4a26483 * I2CP/I2PTunnel locking fixes (partial fixes for tickets 650. 815, 946, 947, 953):
- I2PSocketManagerFactory: New createDisconnectedManager(), javadocs
   - I2PSessionImpl: Rewrite state management and locking, prevent multiple
     connect() calls, but allow disconnect() to interrupt connect()
   - I2PSimpleSession: Changes to match I2PSessionImpl
   - I2PTunnelServer: Don't connect in constructor, use createDisconnectedManager()
     for a final manager, finals and cleanups
   Lightly tested.
   Todo: I2PTunnelClientBase
2013-07-10 18:54:25 +00:00
zzz
6f5f4d179b * Streaming:
- Don't stop timers when session disconnects (tickets #644, #810)
   - Throw exception on attempt to use destroyed socket manager
   - Clear TCBShare cache when stopped
   - Javadocs
2013-07-04 14:54:46 +00:00
zzz
0db7e2873c * Updater: Fix plugin update checker (ticket #897)
* Utils: Reduce logging in wrapper log when extracting zip files
2013-07-03 17:12:32 +00:00
zzz
79f8e88e5f propagate from branch 'i2p.i2p' (head 2a2c708bf9fee43e69469bdf896dfe489c32bdea)
to branch 'i2p.i2p.zzz.ipv6' (head c33552d7026b0a445d1dd7e138bf454144130eb2)
2013-06-28 16:10:49 +00:00
zzz
eb5a23fc5b finals, remove static log 2013-06-28 12:17:19 +00:00
zzz
847a441d59 disapproval of revision '8611baad56e8e18941721b156256783ba996a3cd'
Revert 8611baad56e8e18941721b156256783ba996a3cd
Don't use intern() on externally-supplied strings
as it could be used to exhaust memory
2013-06-28 12:01:13 +00:00
a5df6d419d use String.intern() instead of a homebrew equivalent 2013-06-27 19:04:28 +00:00
zzz
87826daae9 mac static, final 2013-06-22 19:02:59 +00:00
zzz
bb100de702 * SSU:
- Ignore padding beyond last multiple of 16 (prep for obfuscation)
  - Comment out xor with 0 (version)
  - Don't need to zero IV buf before overwriting
* AES:
  - Decrypt speedup by XOR in place
  - Log if decrypt not mod 16
2013-06-21 19:21:02 +00:00
25feb745bc Volatil-ize some fields 2013-06-18 17:09:05 +00:00