Class FieldCryptoXmlTxt0.ConcealReal
- Enclosing class:
- FieldCryptoXmlTxt0
public class FieldCryptoXmlTxt0.ConcealReal
extends java.lang.Object
The algorithm conceals by mapping the value in a linear fashion that cannot be reversed without the encryption key. The mapping preserves the numerical order relationship between values so that one can say the concealment effectively hides the true value but the method of hiding it falls short of some definitions of encryption because encryption, by those definitions, would randomize the order relationship in an apparently random fashion.
In the current algorithm, the linear relationship scales by a factor between a very large and a very small amount depending on the bit pattern found by encryption of the name.
If the estimated range of the values has been given in the EncryptedFieldTable, then the value will first be offset by a positive amount between vmin and vmax. The offset is applied before scaling to prevent certain roundoff errors that occur with low probability when the addition operation is performed after scaling.
-
Constructor Summary
Constructors Constructor Description ConcealReal()
-
Method Summary
Modifier and Type Method Description java.lang.String
concealRange(EncryptedFieldTable.Row row, java.lang.String s)
Conceal a real range by concealing both the high and low values with the concealReal function.java.lang.String
concealRange(EncryptedFieldTable.Row row, EncryptedFieldTable.RealRange range)
Conceal a real range by concealing both the high and low values with the concealReal function.java.lang.String
concealReal(EncryptedFieldTable.Row row, double xvalue)
Conceal the real value contained in "xvalue" according to the description provided in the "row".java.lang.String
concealReal(EncryptedFieldTable.Row row, java.lang.String value)
Conceal the real value contained in the string "value" according to the description provided in the row.java.lang.String
revealRange(EncryptedFieldTable.Row row, java.lang.String s)
Reveal a real range by revealing both the high and low values with the revealReal function.java.lang.String
revealRange(EncryptedFieldTable.Row row, EncryptedFieldTable.RealRange range)
Reveal a real range by revealing both the high and low values with the revealReal function.java.lang.String
revealReal(EncryptedFieldTable.Row row, double xvalue)
Reveal the real value contained in "xvalue" according to the description provided in the "row".java.lang.String
revealReal(EncryptedFieldTable.Row row, java.lang.String value)
Reveal the real value contained in the string "value" according to the description provided in the row.
-
Constructor Details
-
ConcealReal
public ConcealReal()
-
-
Method Details
-
concealReal
public java.lang.String concealReal(EncryptedFieldTable.Row row, java.lang.String value) throws CryptoExceptionConceal the real value contained in the string "value" according to the description provided in the row. The concealment algorithm uses scale and offset factors determined from the encrypted value of the name - a value that appears random and can only be determined if the encryption key is known.Note that the name that is used for the method is partially qualified name found in the EncryptedFieldTable. We do not use two other alternatives those being the fully qualified name in the document and the single, rightmost part of the qualified name.
- Parameters:
row
- from EncryptedFieldTable that describes the fieldvalue
-- Returns:
- concealed value
- Throws:
CryptoException
-
revealReal
public java.lang.String revealReal(EncryptedFieldTable.Row row, java.lang.String value) throws CryptoExceptionReveal the real value contained in the string "value" according to the description provided in the row. Reverse the concealment algorithm performed by function concealReal.- Parameters:
row
- from EncryptedFieldTable that describes the fieldvalue
- - concealed real value- Returns:
- clear text real value
- Throws:
CryptoException
-
concealReal
public java.lang.String concealReal(EncryptedFieldTable.Row row, double xvalue) throws CryptoExceptionConceal the real value contained in "xvalue" according to the description provided in the "row". The concealment algorithm uses scale and offset factors determined from the encrypted value of the name - a value that appears random and can only be determined if the encryption key is known.Note that the name that is used for the method is partially qualified name found in the EncryptedFieldTable. We do not use two other alternatives those being the fully qualified name in the document and the single, rightmost part of the qualified name.
- Parameters:
row
- from EncryptedFieldTable that describes the fieldxvalue
-- Returns:
- concealed value
- Throws:
CryptoException
-
revealReal
public java.lang.String revealReal(EncryptedFieldTable.Row row, double xvalue) throws CryptoExceptionReveal the real value contained in "xvalue" according to the description provided in the "row". Reverse the effect of concealReal.- Parameters:
row
- from EncryptedFieldTable that describes the fieldxvalue
- - concealed value- Returns:
- clear text real value
- Throws:
CryptoException
-
concealRange
public java.lang.String concealRange(EncryptedFieldTable.Row row, EncryptedFieldTable.RealRange range) throws CryptoExceptionConceal a real range by concealing both the high and low values with the concealReal function.- Parameters:
row
- from EncryptedFieldTable that describes the fieldrange
-- Returns:
- concealed value range
- Throws:
CryptoException
-
revealRange
public java.lang.String revealRange(EncryptedFieldTable.Row row, EncryptedFieldTable.RealRange range) throws CryptoExceptionReveal a real range by revealing both the high and low values with the revealReal function.- Parameters:
row
- - from EncryptedFieldTable that describes the fieldrange
- - concealed range- Returns:
- clear text range
- Throws:
CryptoException
-
concealRange
public java.lang.String concealRange(EncryptedFieldTable.Row row, java.lang.String s) throws CryptoExceptionConceal a real range by concealing both the high and low values with the concealReal function.- Parameters:
row
- - from EncryptedFieldTable that describes the fields
- - a string containing a text representation of a real range- Returns:
- a string containing the range concealed with encryption key
- Throws:
CryptoException
-
revealRange
public java.lang.String revealRange(EncryptedFieldTable.Row row, java.lang.String s) throws CryptoExceptionReveal a real range by revealing both the high and low values with the revealReal function. Reverse the effect of the concealRange function.- Parameters:
row
- - from EncryptedFieldTable that describes the fields
- -string containing a concealed text representation of a real range- Returns:
- clear text real range
- Throws:
CryptoException
-