Saturday, May 4, 2019

Algorithms used for creating the keys are called digital signature algorithms. There are two kinds of encryption algorithms - RSA and ECDSA. In both cases, a message signed with the public key can only be opened with the help of the corresponding private key. RSA has historically been more popular with ECDSA gaining support only recently. They are usually compared in terms of bits to denote their security level. Bits is the number of steps taken before an attacker can compromise the security. A 2048-bit RSA public key has a security level of 112 bits. ECDSA needs only 224-bit sized public keys to provide the same security level which provides efficiency for storage. Signing and verification of the signature constitute the two most costly steps performed. The input size plays into this cost for embedded devices.  
Before we compare keystore and truststore with the applications of these algorithm types, let us make a few definitions clear for our discussions:
a server-cert: is the certificate that the server gives the client
a server-key: is the private key associated with the server-cert
a server-ca-cert: is the certificate of the Certificate Authority that signed the server-cert
a client-cert: is the certificate that the client presents to the server
a client-key: is the private key that corresponds to the client-cert
a client-ca-cert: is the certificate that the CA used to sign the client-cert.
The keystore has a private key and the certificate is usually of the same type as the algorithm used with the private key. A keystore can be jks or pkcs12. The former is older and deprecated while the latter is used. pkcs12 had a notable bug  A pkcs12 file that contains only the client-ca-cert does not import into a java keystore. It was called the pkcs12 loading bug. This results in a broken pipe exception on the client side and a no trusted certificate found on the server side. It happens because the server has sent a certificate request but does not include any domain names with which the server can look them up. 
#codingexercise
Node GetSecondLargestInBST (Node root){ 
Node largest = GetRightmost (root); 
Return  GetPredecessor(largest); 

} 

No comments:

Post a Comment