politicnewsbusterinsiderpostreview

Sunday, 2 July 2023

[New post] Strong keys may be bad for your blood pressure.

Site logo image Colin Paice posted: " I've just spent a couple of days trying to get a web server to use an Elliptic key with size 521. It works on Firefox, Curl, and OpenSSL, but not on Chrome. Weaker keys work of size 256 and 384 work fine, except in some cases a key size of 256 gave did" ColinPaice

Strong keys may be bad for your blood pressure.

Colin Paice

Jul 2

I've just spent a couple of days trying to get a web server to use an Elliptic key with size 521. It works on Firefox, Curl, and OpenSSL, but not on Chrome. Weaker keys work of size 256 and 384 work fine, except in some cases a key size of 256 gave did not work on z/OS.

I was trying to get the Apache HTTPD server on z/OS to use a certificate, and it failed. I tried using a similar certificate from the openssl Simple server on Linux and it failed, so I'm guessing that my Chrome version (Version 114.0.5735.198 (Official Build) (64-bit)) does not support it.

  • The problem
  • Diagnostics
    • Wireshark capturing encrypted data
  • Diagnostics that were not helpful
    • Chrome trace
    • z/OS System SSL trace
  • Creating a certificate on z/OS
  • Running a Linux web server
  • Chrome startup options

The problem

In Chrome I got

This site can't provide a secure connection 10.1.1.2 sent an invalid response. ERR_SSL_PROTOCOL_ERROR

This is not entirely true, as the browser sent the Alert response to the server and it was not an ERR_SSL_PROTOCOL_ERROR. After this the browser code returned its caller saying "failed" . Using Wireshark, capturing encrypted data showed the data flowing from the browser to the server to port 443),

Transmission Control Protocol, Src Port: 38188, Dst Port: 443  Transport Layer Security   TLSv1.3 Record Layer: Change Cipher Spec Protocol: Change Cipher Spec     Content Type: Change Cipher Spec (20)     Change Cipher Spec Message   TLSv1.3 Record Layer: Alert (Level: Fatal, Description: Decrypt Error)     Opaque Type: Application Data (23)     Alert Message       Level: Fatal (2)       Description: Decrypt Error (51)

In the Apache HTTPD error.log it had

SSL0209E: SSL Handshake Failed, ERROR processing cryptography. [10.1.0.2:38188 -> 10.1.1.2:443] 

Which is not very helpful. The problem occurred on the browser; all the server sees is Alert code 51.

Taking a system SSL trace on z/OS(GSK Server) gave me

Job HTTPCP8   Process 0501003C  Thread 00000032  read_tls13_alert    TLS 1.3 alert 51 received from ::ffff:10.1.0.2.38188. 

Diagnostics

Using tools like gsktrace on z/OS, and Wireshark to see the flow over the network. I could see that an alert was sent from the Chrome browser to server with type Decrypt Error(51). This meant it was a problem at the browser end, not the server end.

Wireshark capturing encrypted data.

If you use TLS 1.3 once the "change cipher spec" has been issued, all traffic is encrypted, and by default Wireshark cannot read it. For example

Transport Layer Security  TLSv1.3 Record Layer: Change Cipher Spec Protocol: Change Cipher Spec    Content Type: Change Cipher Spec (20)      Change Cipher Spec Message  TLSv1.3 Record Layer: Application Data Protocol: http-over-tls    Opaque Type: Application Data (23)      Version: TLS 1.2 (0x0303)        Encrypted Application Data: 489be8a0976798290766c9ee158c24f5863d18       [Application Data Protocol: http-over-tls]d

and you cannot tell this is reporting an error.

Wireshark can decrypt this. You need to set an environment variable, and start the application from the terminal window, to pickup the environment variable.

export SSLKEYLOGFILE=$HOME/sslkeylog.log google-chrome

This will cause the application( the google-chrome browser) to start and to write the TLS key data to the file.

Configure Wireshark to use this file:

  • Edit
  • Preferences
  • Expand the Protocols twistie
  • Scroll down to TLS ( typing T gets you near it)
  • Enter the Master-Secret log file name mine is /home/colinpaice/sslkeylog.log

Now, if you run the test you should get the data decrypted

Transport Layer Security  TLSv1.3 Record Layer: Change Cipher Spec Protocol: Change Cipher Spec    Content Type: Change Cipher Spec (20)    Change Cipher Spec Message  TLSv1.3 Record Layer: Alert (Level: Fatal, Description: Decrypt Error)   Opaque Type: Application Data (23)     [Content Type: Alert (21)]     Alert Message       Level: Fatal (2)       Description: Decrypt Error (51)

Diagnostics that were not helpful.

Chrome trace

Starting Chrome from a terminal session

google-chrome --enable-logging --v=1

The output was in ./.config/google-chrome/chrome_debug.log.

Using grep ERROR ./.config/google-chrome/chrome_debug.log gave me

...:ERROR:nss_util.cc(357)] After loading Root Certs, loaded==false: NSS error code: -8018 ...:ERROR:ssl_client_socket_impl.cc(978)] handshake failed; returned -1, SSL error code 1, net_error -107 ...:ERROR:ssl_client_socket_impl.cc(978)] handshake failed; returned -1, SSL error code 1, net_error -107

and no other useful information besides net_error -107. For these codes see here. 107 is an unhelpful message NET_ERROR SSL_PROTOCOL_ERROR.

Wireshark gave me decrypt error.

z/OS system SSL trace

Using GSKSRVR and CTRACE on z/OS. See here. This gave me

S0W1      MESSAGE   00000004  17:20:47.690772  SSL_ERROR    Job HTTPCP8   Process 0501003C  Thread 00000032  read_tls13_alert    TLS 1.3 alert 51 received from ::ffff:10.1.0.2.60830. 

Which shows the alert came from the browser.

Creating a certificate on z/OS

On z/OS I used

RACDCERT ID(START1) GENCERT -                               SUBJECTSDN(CN('10.1.1.2') -               O('NISTECCTEST') -               OU('SSS')) -                                    ALTNAME(IP(10.1.1.2))-                                    NISTECC -     KEYUSAGE(   HANDSHAKE     )  -     SIZE(384) -     SIGNWITH (CERTAUTH LABEL('DOCZOSCA')) -                   WITHLABEL('NISTECCTEST')     -                                                           

With different sizes 256,284, and 521. The IBM documentation says For NISTECC keys, valid key sizes are 192, 224, 256, 384, and 521 bits. I had problems with key size 521 bits.

On Linux I used

timeout="--connect-timeout 10" enddate="-enddate 20240130164600Z"  ext="-extensions end_user" name="docec384" key="$name.key.pem" cert="$name.pem"  subj="-subj /C=GB/O=Doc2/CN="$name  CA="docca256" cafiles="-cert $CA.pem -keyfile $CA.key.pem " rm $name.key.pem rm $name.csr rm $name.pem passin="-passin file:password.file" passout="-passout file:password.file" md="-md sha384" policy="-policy signing_policy" caconfig="-config ca2.config" caextensions="-extensions clientServer" config="-config openssl.config"  openssl ecparam -name secp384r1 -genkey -noout -out $name.key.pem  openssl req $config -new -key $key -out $name.csr -outform PEM -$subj $passin $passout  openssl ca $caconfig $policy $ext $md $cafiles -out $cert -in $name.csr $enddate $caextensions   openssl x509 -in $name.pem -text -noout|lessf

I used this as a template with different flavours of -name secp384r1

  • -name secp384r1
  • -name prime256v1 which worked
  • -name secp521r1 which did not work

You can get a list of valid names from the command openssl ecparam -list_curves.

Running a Linux web server

I tried using the openssl s_server, and could also reproduce this problem (with a much faster turnaround). I used

tls="-tls1_3  " #cert=" -cert ./docec256.pem -key ./docec256.key.pem" #cert=" -cert ./docecgen.pem -certform pem -key docecgen.key.pem -keyform pem"  #cert=" -cert ./docec521.pem -certform pem -key docec521.key.pem -keyform pem" cert=" -cert ./docec384.pem -certform pem -key docec384.key.pem -keyform pem"  CA="-chainCAfile ./docca256.pem" cipher1="-cipher TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384"  cipher=$cipher1 port="-port 4433 "  strict="-x509_strict -strict" debug="-trace"  #  ca="-CAfile ./zpdt.ca.pem " openssl s_server $port $tls  $cert $cipher $CA $debug $strict -www  

Chrome startup options

You can start chrome from a terminal with many startup options. See here

Comment
Like
Tip icon image You can also reply to this email to leave a comment.

Unsubscribe to no longer receive posts from ColinPaice.
Change your email settings at manage subscriptions.

Trouble clicking? Copy and paste this URL into your browser:
http://colinpaice.blog/2023/07/02/strong-keys-may-be-bad-for-your-blood-pressure/

WordPress.com and Jetpack Logos

Get the Jetpack app to use Reader anywhere, anytime

Follow your favorite sites, save posts to read later, and get real-time notifications for likes and comments.

Download Jetpack on Google Play Download Jetpack from the App Store
WordPress.com on Twitter WordPress.com on Facebook WordPress.com on Instagram WordPress.com on YouTube
WordPress.com Logo and Wordmark title=

Learn how to build your website with our video tutorials on YouTube.


Automattic, Inc. - 60 29th St. #343, San Francisco, CA 94110  

at July 02, 2023
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

BREAKING: North Carolina automotive group acquires 7 Upstate dealerships

Breaking news from GSA Business Report Click here to view this message in a browser window. ...

  • Search Engine Watch
    Search Engine Watch ...
  • Search Engine Watch
    Search Engine Watch Seven Google alerts SEOs need to stay on top of everything! Posted: 25 Jan 2022...
  • Search Engine Watch
    Search Engine Watch ...
  • https://paxorex.blogspot.com
  • https://acciyo.blogspot.com
  • https://sunbrew.blogspot.com
  • https://readingvox.blogspot.com
  • https://neextdraft.blogspot.com
  • https://udimy.blogspot.com
  • https://arcieve.blogspot.com
  • https://diabetesmail.blogspot.com
  • https://quiltingmail.blogspot.com
  • https://downloadallyouwanttutorials.blogspot.com
  • https://increasingmarketingsystem.blogspot.com
  • https://skysportingnewsnationspinquirer.blogspot.com
  • https://politicnewsbusterinsiderpostreview.blogspot.com
  • https://javascripttrendlist.blogspot.com
  • https://teraqiitatail.blogspot.com
  • https://bigpalacenews.blogspot.com
  • https://executivetowernews.blogspot.com
  • https://magnificentplannews.blogspot.com
  • https://businessinboard.blogspot.com
  • https://patriotsscience.blogspot.com
  • https://allinonequantumleap.blogspot.com
  • https://foodandrecipefusion.blogspot.com
  • https://newsletterforeveryone.blogspot.com
  • https://snacksrobinhood.blogspot.com
  • https://dailynewslettersph.blogspot.com
  • https://rankedrama.blogspot.com
  • https://oschinanet.blogspot.com
  • https://nourich.blogspot.com
  • https://phnewsnet.blogspot.com
  • https://structuresusingc.blogspot.com
  • https://foodubers.blogspot.com
  • https://genuinequality.blogspot.com
  • https://techdigitalmedia.blogspot.com
  • https://entertainmenhubtbiz.blogspot.com
  • https://sportsbookwire.blogspot.com
  • https://societycast.blogspot.com
  • https://lifestylesportsreturn.blogspot.com
  • https://natureimpactfactor.blogspot.com
  • https://artnetworth.blogspot.com
  • https://entrepreneurexamples.blogspot.com
  • https://cryptomarketbase.blogspot.com
  • https://btsbiot.blogspot.com
  • https://sexybinikis.blogspot.com
  • https://foreignexchangecurrency.blogspot.com
  • https://classifiedexample.blogspot.com
  • https://bookboons.blogspot.com
  • https://writingdate.blogspot.com
  • https://wamios.blogspot.com
  • https://justmightdiy.blogspot.com
  • https://playfreeonlinegamesmore.blogspot.com
  • https://healthlinefitnessfirst.blogspot.com
  • https://snaptikvideodownloader.blogspot.com
  • https://pokemonunitepc.blogspot.com
  • https://neverthelesskdrama.blogspot.com
  • https://coolantioniq.blogspot.com
  • https://hackerploit.blogspot.com
  • https://ballbreakdown.blogspot.com
  • https://flixsterio.blogspot.com
  • https://fortnitebattleroyaletrack.blogspot.com
  • https://manilaplus.blogspot.com
  • https://davaoplus.blogspot.com
  • https://tutorialsfiles.blogspot.com
  • https://mondaymorningcookingclub.blogspot.com
  • https://gymnearmee.blogspot.com
  • https://windows26.blogspot.com
  • https://millionaireinvest.blogspot.com
  • https://latestkhmernews.blogspot.com
  • https://latestisraelnews.blogspot.com
  • https://latestaustralianews.blogspot.com
  • https://latestirannews.blogspot.com
  • https://latestjapannews.blogspot.com
  • https://latestsaudinews.blogspot.com
  • https://latestfreecourse.blogspot.com
  • https://ikeafurnitureaccessories.blogspot.com
  • https://makeupandbeautyproduct.blogspot.com
  • https://latestpets.blogspot.com
  • https://topecommerceniches.blogspot.com
  • https://latesttexasnews.blogspot.com
  • https://latestufcgame.blogspot.com
  • https://tipweightlossfast.blogspot.com
  • https://latestcancercure.blogspot.com
  • https://philsys.blogspot.com
  • https://phoramensoba.blogspot.com
  • https://latestcupcakes.blogspot.com
  • https://latestgivex.blogspot.com
  • https://latestlottoresult.blogspot.com
  • https://downloadarchived.blogspot.com
  • https://doesports.blogspot.com

Search This Blog

  • Home

About Me

politicnewsbusterinsiderpostreview
View my complete profile

Report Abuse

Labels

  • 【ANDROID STUDIO】ViewModel Two Way Data Binding
  • 【FLUTTER ANDROID STUDIO and IOS】 Cupertino TabScaffold
  • 【FLUTTER ANDROID STUDIO and IOS】 Expenses App
  • 【FLUTTER ANDROID STUDIO and IOS】 Explicit Animations
  • 【FLUTTER ANDROID STUDIO and IOS】 PDF Viewer
  • 【FLUTTER ANDROID STUDIO and IOS】 productivity timer
  • 【FLUTTER ANDROID STUDIO and IOS】 SimpleDialog
  • 【FLUTTER ANDROID STUDIO and IOS】bidirectional swipable or slidable sqflite with remote http using dio
  • 【FLUTTER ANDROID STUDIO and IOS】bloc design pattern
  • 【FLUTTER ANDROID STUDIO and IOS】bluetooth
  • 【FLUTTER ANDROID STUDIO and IOS】Call Android Java Code
  • 【FLUTTER ANDROID STUDIO and IOS】card selector
  • 【FLUTTER ANDROID STUDIO and IOS】change the chart dynamically using provider state management
  • 【FLUTTER ANDROID STUDIO and IOS】chip
  • 【FLUTTER ANDROID STUDIO and IOS】CircularProgressIndicator
  • 【FLUTTER ANDROID STUDIO and IOS】credit card view
  • 【FLUTTER ANDROID STUDIO and IOS】CRUD Streams
  • 【FLUTTER ANDROID STUDIO and IOS】DropdownButton
  • 【FLUTTER ANDROID STUDIO and IOS】dynamic event calendar management
  • 【FLUTTER ANDROID STUDIO and IOS】Endless ListView
  • 【FLUTTER ANDROID STUDIO and IOS】face detection and recognition using machine learning vision
  • 【FLUTTER ANDROID STUDIO and IOS】Fetch Data From The Internet
  • 【FLUTTER ANDROID STUDIO and IOS】Firebase Firestore Realtime CRUD operation
  • 【FLUTTER ANDROID STUDIO and IOS】folding cell
  • 【FLUTTER ANDROID STUDIO and IOS】Fuzzy search list initially translated from Fusejs
  • 【FLUTTER ANDROID STUDIO and IOS】GETX State Management
  • 【FLUTTER ANDROID STUDIO and IOS】giffy dialog
  • 【FLUTTER ANDROID STUDIO and IOS】IconButton
  • 【FLUTTER ANDROID STUDIO and IOS】leaflet map with marker popup
  • 【FLUTTER ANDROID STUDIO and IOS】load csv
  • 【FLUTTER ANDROID STUDIO and IOS】Measures Converter
  • 【FLUTTER ANDROID STUDIO and IOS】Multiple Files For Each Screen
  • 【FLUTTER ANDROID STUDIO and IOS】Navigate With Named Routes
  • 【FLUTTER ANDROID STUDIO and IOS】Nesting Rows and Columns
  • 【FLUTTER ANDROID STUDIO and IOS】notifications in background handling with Workmanager
  • 【FLUTTER ANDROID STUDIO and IOS】Packing Widgets
  • 【FLUTTER ANDROID STUDIO and IOS】Parsin JSON In The Background
  • 【FLUTTER ANDROID STUDIO and IOS】Parsing Blogger or Blogspot RSS Feeds in Flutter
  • 【FLUTTER ANDROID STUDIO and IOS】rating dialog
  • 【FLUTTER ANDROID STUDIO and IOS】restful calls with ajax
  • 【FLUTTER ANDROID STUDIO and IOS】Reverse and Stop Animations
  • 【FLUTTER ANDROID STUDIO and IOS】reviews slider
  • 【FLUTTER ANDROID STUDIO and IOS】RxDart BloC
  • 【FLUTTER ANDROID STUDIO and IOS】Scan Text and Barcodes Recognition and Detection with ML Kit
  • 【FLUTTER ANDROID STUDIO and IOS】scratch card
  • 【FLUTTER ANDROID STUDIO and IOS】SQflite and mobx with Cache log
  • 【FLUTTER ANDROID STUDIO and IOS】sqlite task manager Any Task Any Goal Get Things Done
  • 【FLUTTER ANDROID STUDIO and IOS】Staggered Animation
  • 【FLUTTER ANDROID STUDIO and IOS】staggered grid view
  • 【FLUTTER ANDROID STUDIO and IOS】Stateful Send Data To A New Screen
  • 【FLUTTER ANDROID STUDIO and IOS】text to speech
  • 【FLUTTER ANDROID STUDIO and IOS】Tween Animation
  • 【FLUTTER ANDROID STUDIO and IOS】Typehead autocompletion textfield library
  • 【FLUTTER ANDROID STUDIO and IOS】video recorder and picker and image picker
  • 【GAMEMAKER】 Enemy Path Finding
  • 【GAMEMAKER】Allowing a Player to Get In or Out of the Drivable Vehicle
  • 【GAMEMAKER】Card battle
  • 【GAMEMAKER】Character Stats Progression Upgrade
  • 【GAMEMAKER】Destructable Terrain
  • 【GAMEMAKER】Dice Roll
  • 【GAMEMAKER】Fishing_Mini_Game
  • 【GAMEMAKER】HUD show spells
  • 【GAMEMAKER】Lives
  • 【GAMEMAKER】Pong Retro Game Remake
  • 【GAMEMAKER】Positional Audio
  • 【GAMEMAKER】Retro Brick and Ball Game Remake
  • 【GAMEMAKER】Simple Battle System
  • 【GAMEMAKER】Simple Game Quest
  • 【GAMEMAKER】sokoban Designing Levels a room with string or text gamemaker with http get
  • 【GAMEMAKER】sokoban pushable object
  • 【GAMEMAKER】Speech bubble typewriter alert text effect
  • 【GAMEMAKER】Tank Trax with wind simulation remake
  • 【GAMEMAKER】write text files that can be downloaded and processed
  • 【LARAVEL and FLUTTER ANDROID STUDIO and IOS】Authentication System in Flutter with Laravel Passport
  • 【LARAVEL and FLUTTER ANDROID STUDIO and IOS】GETX and Dio CRUD Create Read Update Delete
  • 【LARAVEL and FLUTTER ANDROID STUDIO and IOS】GETX and GETX STORAGE CRUD Create Read Update Delete
  • 【LARAVEL and FLUTTER ANDROID STUDIO and IOS】IndexedStack Keep State(Avoid to Rebuild)
  • 【LARAVEL and FLUTTER ANDROID STUDIO and IOS】Laravel Pagination infinite scroll load more
  • 【LARAVEL and FLUTTER ANDROID STUDIO and IOS】Uploading a File to a Server from Flutter Using a Multi-Part (form-data) POST Request
  • 【LARAVEL PHP and FLUTTER ANDROID STUDIO and IOS】dynamic multiple text field
  • 【PYTHON OPENCV】 Face detection using dlib frontal face detector
  • 【PYTHON OPENCV】Cat face detection using haar feature-based cascade classifiers
  • 【PYTHON OPENCV】Face detection using cvlib face detector (uses DNN OpenCV face detector)
  • 【PYTHON OPENCV】Face detection using dlib CNN face detector using a pre-trained model
  • 【PYTHON OPENCV】Face detection using dlib frontal face detector
  • 【PYTHON OPENCV】Face detection using haar feature-based cascade classifiers
  • 【PYTHON OPENCV】Face detection using OpenCV DNN face detector
  • 【PYTHON OPENCV】Image classification using OpenCV CNN module SqueezeNet and caffe pre trained models
  • 【PYTHON OPENCV】This script makes used of dlib library to calculate the 128D descriptor to be used for face recognition and compare the faces using some distance metrics
  • 【PYTHON OPENCV】Training a linear regression model using Keras
  • 【PYTHON】Cross Validation Regression R2
  • 【REDUX and VANILLA JS】 CRUD
  • 【Visual Studio vbnet】 Delete All
  • 【Visual Studio Visual Csharp】Item Color
  • 【VISUAL VB NET】Enumerate Windows
  • 【VISUAL VB NET】Export HTML table to excel any format xls
  • 【VISUAL VB NET】File Properties
  • 【VISUAL VB NET】Monitor StandBy
  • 【VISUAL VB NET】Mouse Position
  • 【VISUAL VB NET】MS Word
  • 【VISUAL VB NET】Mutex
  • 【VISUAL VB NET】Panel Gradient
  • 【VISUAL VB NET】Print
  • 【VISUAL VB.NET】Admin Check
  • 【VISUAL VB.NET】Calendar
  • 【VISUAL VB.NET】Convert To Hex
  • 【VISUAL VB.NET】Create Desktop Shortcut
  • 【VISUAL VB.NET】Create File and Write File
  • 【VISUAL VB.NET】Enumerate_network_resources
  • 【VISUAL VB.NET】File Dates Info
  • 【VISUAL VB.NET】Firewall Enable or Disable
  • 【VISUAL VB.NET】Get DiskFreeSpace
  • 【VISUAL VB.NET】Get_computer_name
  • 【VISUAL VB.NET】Get_processor_type
  • 【Vuejs】 bind the values ​​of parent and child components in two directions
  • 【Vuejs】 book management (use directive and filter)
  • 【VUEJS】 seamless carousel effect
  • 【Vuejs】 Weekly Expenses app with chart js
  • 【VUEJS】element ui audio player functions
  • 【VUEJS】photo-sphere-viewer 360°×180° panoramic plug-in to simulate VR viewing and room switching
  • 【Vuejs】realtime geolocation tracking with leaflets and firebase database
  • 【Vuejs】Response speed test tool
  • and SQLite
  • and weapon
  • BLoCs
  • change HP
  • Face detection using face_recognition CNN face detector (internally calls dlib CNN face detector)
  • Gold
  • inventory
  • which is based on Histogram of Oriented Gradients (HOG) features and a linear classifier in a sliding window detection approach
  • xlsx
  • xml
  • XP

Blog Archive

  • August 2023 (1890)
  • July 2023 (2818)
  • June 2023 (2887)
  • May 2023 (3025)
  • April 2023 (2803)
  • March 2023 (2973)
  • February 2023 (2644)
  • January 2023 (2760)
  • December 2022 (2650)
  • November 2022 (2615)
  • October 2022 (2585)
  • September 2022 (2497)
  • August 2022 (2502)
  • July 2022 (2522)
  • June 2022 (2639)
  • May 2022 (2318)
  • April 2022 (2361)
  • March 2022 (2365)
  • February 2022 (2208)
  • January 2022 (2359)
  • December 2021 (2475)
  • November 2021 (3152)
  • October 2021 (3245)
  • September 2021 (3145)
  • August 2021 (3261)
  • July 2021 (3191)
  • June 2021 (3123)
  • May 2021 (3027)
  • April 2021 (2578)
  • March 2021 (1895)
  • February 2021 (1363)
  • January 2021 (1524)
  • December 2020 (916)
Powered by Blogger.