Top Inners Fields Constructors Methods
org.eclipse.jgit.transport

pack-priv abstract Class WalkEncryption

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.jgit.transport.WalkEncryption.NoEncryption, org.eclipse.jgit.transport.WalkEncryption.JetS3tV2, org.eclipse.jgit.transport.WalkEncryption.SymmetricEncryption
Imports
java.io.IOException, .InputStream, .OutputStream, java.net.HttpURLConnection, java.security.AlgorithmParameters, .GeneralSecurityException, java.security.spec.AlgorithmParameterSpec, .KeySpec, java.text.MessageFormat, java.util.Locale, .Properties, java.util.regex.Matcher, .Pattern, javax.crypto.Cipher, .CipherInputStream, .CipherOutputStream, .SecretKey, .SecretKeyFactory, javax.crypto.spec.IvParameterSpec, .PBEKeySpec, .PBEParameterSpec, .SecretKeySpec, org.eclipse.jgit.internal.JGitText, org.eclipse.jgit.util.Base64, .Hex

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
WalkEncryption.JetS3tV2

JetS3t compatibility reference: EncryptionUtil.java

Note: EncryptionUtil is inadequate:

  • EncryptionUtil.isCipherAvailableForUse checks encryption only which "always works", but in JetS3t both encryption and decryption use non-IV aware algorithm parameters for all PBE specs, which breaks in case of AES
  • that means that only non-IV algorithms will work round trip in JetS3t, such as PBEWithMD5AndDES and PBEWithSHAAndTwofish-CBC
  • any AES based algorithms such as "PBE...With...And...AES" will not work, since they need proper IV setup
pack-priv static class
WalkEncryption.JGitV1

Provides JetS3t-like encryption with AES support.

pack-priv static class
WalkEncryption.JGitV2

Supports both PBE and non-PBE algorithms.

pack-priv static interface
WalkEncryption.Keys

Encryption property names.

private static class
pack-priv abstract static class
WalkEncryption.SymmetricEncryption

Base implementation of JGit symmetric encryption.

pack-priv static interface
WalkEncryption.Vals

Encryption constants and defaults.

Field Summary

Modifier and TypeField and Description
pack-priv static final String
pack-priv static final String
pack-priv static final WalkEncryption

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract InputStream
pack-priv abstract OutputStream
pack-priv IOException
pack-priv static WalkEncryption

Returns:

instance this object
instance
(Properties
configuration properties
props
)

Encryption factory.

pack-priv abstract void
pack-priv static GeneralSecurityException
securityError(String message, Throwable cause)

pack-priv abstract void
protected void
validateImpl(final HttpURLConnection u, final String prefix, final String version, final String name)

Validate

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

JETS3T_CRYPTO_ALGback to summary
pack-priv static final String JETS3T_CRYPTO_ALG
JETS3T_CRYPTO_VERback to summary
pack-priv static final String JETS3T_CRYPTO_VER
NONEback to summary
pack-priv static final WalkEncryption NONE

Constructor Detail

WalkEncryptionback to summary
pack-priv WalkEncryption()

Method Detail

decryptback to summary
pack-priv abstract InputStream decrypt(InputStream input) throws IOException
encryptback to summary
pack-priv abstract OutputStream encrypt(OutputStream output) throws IOException
errorback to summary
pack-priv IOException error(Throwable why)
instanceback to summary
pack-priv static WalkEncryption instance(Properties props) throws GeneralSecurityException

Encryption factory.

Parameters
props:Properties

configuration properties

Returns:WalkEncryption

instance this object

Exceptions
GeneralSecurityException:
if generic security failure occurred
requestback to summary
pack-priv abstract void request(HttpURLConnection conn, String prefix) throws IOException
securityErrorback to summary
pack-priv static GeneralSecurityException securityError(String message, Throwable cause)
validateback to summary
pack-priv abstract void validate(HttpURLConnection conn, String prefix) throws IOException
validateImplback to summary
protected void validateImpl(final HttpURLConnection u, final String prefix, final String version, final String name) throws IOException

Validate

Parameters
u:HttpURLConnection

a java.net.HttpURLConnection object.

prefix:String

a java.lang.String object.

version:String

a java.lang.String object.

name:String

a java.lang.String object.

Exceptions
IOException:
if any.
org.eclipse.jgit.transport back to summary

pack-priv Class WalkEncryption.JetS3tV2

extends WalkEncryption
Class Inheritance

JetS3t compatibility reference: EncryptionUtil.java

Note: EncryptionUtil is inadequate:

Field Summary

Modifier and TypeField and Description
pack-priv static final String
private static final String
private final String
pack-priv static final int
pack-priv static final int
private final AlgorithmParameterSpec
pack-priv static final byte[]
private final SecretKey
pack-priv static final String
pack-priv static final byte[]
Inherited from org.eclipse.jgit.transport.WalkEncryption:
JETS3T_CRYPTO_ALGJETS3T_CRYPTO_VERNONE

Constructor Summary

AccessConstructor and Description
pack-priv
JetS3tV2(final String algo, final String key)

Method Summary

Modifier and TypeMethod and Description
pack-priv InputStream
pack-priv OutputStream
pack-priv void
pack-priv void
Inherited from org.eclipse.jgit.transport.WalkEncryption:
errorinstancesecurityErrorvalidateImpl

Field Detail

ALGORITHMback to summary
pack-priv static final String ALGORITHM
CRYPTO_VERback to summary
private static final String CRYPTO_VER
cryptoAlgback to summary
private final String cryptoAlg
ITERATIONSback to summary
pack-priv static final int ITERATIONS
KEY_SIZEback to summary
pack-priv static final int KEY_SIZE
paramSpecback to summary
private final AlgorithmParameterSpec paramSpec
SALTback to summary
pack-priv static final byte[] SALT
secretKeyback to summary
private final SecretKey secretKey
VERSIONback to summary
pack-priv static final String VERSION
ZERO_AES_IVback to summary
pack-priv static final byte[] ZERO_AES_IV

Constructor Detail

JetS3tV2back to summary
pack-priv JetS3tV2(final String algo, final String key) throws GeneralSecurityException

Method Detail

decryptback to summary
pack-priv InputStream decrypt(InputStream in) throws IOException

Implements abstract org.eclipse.jgit.transport.WalkEncryption.decrypt.

Annotations
@Override
encryptback to summary
pack-priv OutputStream encrypt(OutputStream os) throws IOException

Implements abstract org.eclipse.jgit.transport.WalkEncryption.encrypt.

Annotations
@Override
requestback to summary
pack-priv void request(HttpURLConnection u, String prefix)

Implements abstract org.eclipse.jgit.transport.WalkEncryption.request.

Annotations
@Override
validateback to summary
pack-priv void validate(HttpURLConnection u, String prefix) throws IOException

Implements abstract org.eclipse.jgit.transport.WalkEncryption.validate.

Annotations
@Override
org.eclipse.jgit.transport back to summary

pack-priv Class WalkEncryption.JGitV1

extends SymmetricEncryption
Class Inheritance

Provides JetS3t-like encryption with AES support. Uses V1 connection file format. For reference, see: 'jgit-s3-connection-v-1.properties'.

Field Summary

Modifier and TypeField and Description
pack-priv static final String
Inherited from org.eclipse.jgit.transport.WalkEncryption.SymmetricEncryption:
cipherAlgocontextdecryptCipherparamsAlgoprofilesecretKeyversion

Constructor Summary

AccessConstructor and Description
pack-priv
JGitV1(String algo, String pass)

Method Summary

Modifier and TypeMethod and Description
pack-priv static Properties
wrap(String algo, String pass)

Inherited from org.eclipse.jgit.transport.WalkEncryption.SymmetricEncryption:
decryptencryptrequestvalidate

Field Detail

VERSIONback to summary
pack-priv static final String VERSION

Constructor Detail

JGitV1back to summary
pack-priv JGitV1(String algo, String pass) throws GeneralSecurityException

Method Detail

wrapback to summary
pack-priv static Properties wrap(String algo, String pass)
org.eclipse.jgit.transport back to summary

pack-priv Class WalkEncryption.JGitV2

extends SymmetricEncryption
Class Inheritance

Supports both PBE and non-PBE algorithms. Uses V2 connection file format. For reference, see: 'jgit-s3-connection-v-2.properties'.

Field Summary

Modifier and TypeField and Description
pack-priv static final String
Inherited from org.eclipse.jgit.transport.WalkEncryption.SymmetricEncryption:
cipherAlgocontextdecryptCipherparamsAlgoprofilesecretKeyversion

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from org.eclipse.jgit.transport.WalkEncryption.SymmetricEncryption:
decryptencryptrequestvalidate

Field Detail

VERSIONback to summary
pack-priv static final String VERSION

Constructor Detail

JGitV2back to summary
pack-priv JGitV2(Properties props) throws GeneralSecurityException
org.eclipse.jgit.transport back to summary

pack-priv Interface WalkEncryption.Keys

Known Direct Implementers
org.eclipse.jgit.transport.WalkEncryption.SymmetricEncryption

Encryption property names.

Field Summary

Modifier and TypeField and Description
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String

Field Detail

JGIT_CONTEXTback to summary
public static final String JGIT_CONTEXT
JGIT_PROFILEback to summary
public static final String JGIT_PROFILE
JGIT_VERSIONback to summary
public static final String JGIT_VERSION
X_ALGOback to summary
public static final String X_ALGO
X_KEY_ALGOback to summary
public static final String X_KEY_ALGO
X_KEY_ITERback to summary
public static final String X_KEY_ITER
X_KEY_SALTback to summary
public static final String X_KEY_SALT
X_KEY_SIZEback to summary
public static final String X_KEY_SIZE
org.eclipse.jgit.transport back to summary

private Class WalkEncryption.NoEncryption

extends WalkEncryption
Class Inheritance

Field Summary

Inherited from org.eclipse.jgit.transport.WalkEncryption:
JETS3T_CRYPTO_ALGJETS3T_CRYPTO_VERNONE

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv InputStream
pack-priv OutputStream
pack-priv void
pack-priv void
Inherited from org.eclipse.jgit.transport.WalkEncryption:
errorinstancesecurityErrorvalidateImpl

Constructor Detail

NoEncryptionback to summary
private NoEncryption()

Method Detail

decryptback to summary
pack-priv InputStream decrypt(InputStream in)

Implements abstract org.eclipse.jgit.transport.WalkEncryption.decrypt.

Annotations
@Override
encryptback to summary
pack-priv OutputStream encrypt(OutputStream os)

Implements abstract org.eclipse.jgit.transport.WalkEncryption.encrypt.

Annotations
@Override
requestback to summary
pack-priv void request(HttpURLConnection u, String prefix)

Implements abstract org.eclipse.jgit.transport.WalkEncryption.request.

Annotations
@Override
validateback to summary
pack-priv void validate(HttpURLConnection u, String prefix) throws IOException

Implements abstract org.eclipse.jgit.transport.WalkEncryption.validate.

Annotations
@Override
org.eclipse.jgit.transport back to summary

pack-priv abstract Class WalkEncryption.SymmetricEncryption

extends WalkEncryption
implements Keys, Vals
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.transport.WalkEncryption.Vals, org.eclipse.jgit.transport.WalkEncryption.Keys
Known Direct Subclasses
org.eclipse.jgit.transport.WalkEncryption.JGitV1, org.eclipse.jgit.transport.WalkEncryption.JGitV2

Base implementation of JGit symmetric encryption. Supports V2 properties format.

Field Summary

Modifier and TypeField and Description
pack-priv final String
cipherAlgo

Full cipher algorithm name.

pack-priv volatile String
pack-priv volatile Cipher
pack-priv final String
paramsAlgo

Cipher algorithm name for parameters lookup.

pack-priv final String
profile

Encryption profile, root name of group of related properties.

pack-priv final SecretKey
secretKey

Generated secret key.

pack-priv final String
version

Encryption version, reflects actual implementation class.

Inherited from org.eclipse.jgit.transport.WalkEncryption:
JETS3T_CRYPTO_ALGJETS3T_CRYPTO_VERNONE

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv InputStream
pack-priv OutputStream
pack-priv void
pack-priv void
Inherited from org.eclipse.jgit.transport.WalkEncryption:
errorinstancesecurityErrorvalidateImpl

Field Detail

cipherAlgoback to summary
pack-priv final String cipherAlgo

Full cipher algorithm name.

contextback to summary
pack-priv volatile String context
decryptCipherback to summary
pack-priv volatile Cipher decryptCipher
paramsAlgoback to summary
pack-priv final String paramsAlgo

Cipher algorithm name for parameters lookup.

profileback to summary
pack-priv final String profile

Encryption profile, root name of group of related properties.

secretKeyback to summary
pack-priv final SecretKey secretKey

Generated secret key.

versionback to summary
pack-priv final String version

Encryption version, reflects actual implementation class.

Constructor Detail

SymmetricEncryptionback to summary
pack-priv SymmetricEncryption(Properties props) throws GeneralSecurityException

Method Detail

decryptback to summary
pack-priv InputStream decrypt(InputStream input) throws IOException

Implements abstract org.eclipse.jgit.transport.WalkEncryption.decrypt.

Annotations
@Override
encryptback to summary
pack-priv OutputStream encrypt(OutputStream output) throws IOException

Implements abstract org.eclipse.jgit.transport.WalkEncryption.encrypt.

Annotations
@Override
requestback to summary
pack-priv void request(HttpURLConnection conn, String prefix) throws IOException

Implements abstract org.eclipse.jgit.transport.WalkEncryption.request.

Annotations
@Override
validateback to summary
pack-priv void validate(HttpURLConnection conn, String prefix) throws IOException

Implements abstract org.eclipse.jgit.transport.WalkEncryption.validate.

Annotations
@Override
org.eclipse.jgit.transport back to summary

pack-priv Interface WalkEncryption.Vals

Known Direct Implementers
org.eclipse.jgit.transport.WalkEncryption.SymmetricEncryption

Encryption constants and defaults.

Field Summary

Modifier and TypeField and Description
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String

Field Detail

DEFAULT_ALGOback to summary
public static final String DEFAULT_ALGO
DEFAULT_KEY_ALGOback to summary
public static final String DEFAULT_KEY_ALGO
DEFAULT_KEY_ITERback to summary
public static final String DEFAULT_KEY_ITER
DEFAULT_KEY_SALTback to summary
public static final String DEFAULT_KEY_SALT
DEFAULT_KEY_SIZEback to summary
public static final String DEFAULT_KEY_SIZE
DEFAULT_VERSback to summary
public static final String DEFAULT_VERS
EMPTYback to summary
public static final String EMPTY
REGEX_PBEback to summary
public static final String REGEX_PBE
REGEX_TRANSback to summary
public static final String REGEX_TRANS
REGEX_WSback to summary
public static final String REGEX_WS