Friday, August 7, 2020

Secure Remote Password (SRP)

https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol


1. Client sends username

2. Server gets username and sends salt and B

3. Client gets salt and B, sends A (randomized number) and M1 (calculate with salt, B, A and password, SCarol = (B − kgx)(a + ux))

4. Server verifies M1

Thursday, August 6, 2020

Wednesday, January 8, 2020

Using CocoaPods in IOS

After "pod install", open ".xcworkspace" instead of ".xcodeproj". Otherwise, the module could not be imported during compilation.

Wednesday, November 27, 2019

Import SSL certication into Java Keystore

Prerequisite: "*.crt", "*.key" from CA, assume the file names are "cert.crt" and "cert.key"
Steps to be performed in Windows desktop:
  1. Rename "cert.crt" to "cert.cer" in Windows
  2. Double click "cert.cer" and "Ceritificate" popup window should be displayed
  3. Click "Certification Path" tab
  4. Double click intermediate certification, eg. "GeoTrust RSA CA 2018", another "Certificate" popup window should be displayed
  5. Click "Details" tab
  6. Click "Copy to File..." button and save the content as "intermediate.cer"
  7. Click "Certification Path" tab again"
  8. Double click root certification, eg. "DigiCert", another "Certificate" popup window should be displayed
  9. Click "Details" tab
  10. Click "Copy to File..." button and save the content as "root.cer"
  11. Concatenate "intermediate.cer" and "root.cer" into "allca.cer", eg. with command "cat intermediate.cer root.cer > allca.cer"
  12. Execute command "openssl pkcs12 -export -in cert.crt -inkey cert.key -out cert.p12 -name {aliasname} -CAfile allca.cer -caname root -chain"
  13. Append "$JAVA_HOME/bin" to "PATH" of cygwin, eg. "export PATH=$PATH:$JAVA_HOME/bin"
  14. Execute command "keytool -importkeystore -deststorepass {password} -destkeystore cert.jks -srckeystore cert.p12 -srcstoretype PKCS12 -srcstorepass {password} -alias {aliasname}"

To verify, use command "keytool -list -v -keystore cert.jks -storepass {password}".

Thursday, August 8, 2019

Terms to be checked after Python article reading

Regarding "Python is eating the world: How one developer's side project became the hottest programming language on the planet":
Global Interpreter Lock
https://realpython.com/python-gil/