Req #81668 [Com]: Implement ED25519 auth for mysqlnd

From: Date: Wed, 03 May 2023 02:33:13 +0000
Subject: Req #81668 [Com]: Implement ED25519 auth for mysqlnd
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-244356@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81668&edit=1 ID: 81668 Comment by: kevinsmith at aol dot com Reported by: arnouxguillaume54 at hotmail dot fr Summary: Implement ED25519 auth for mysqlnd Status: Open Type: Feature/Change Request Package: MySQLi related Operating System: Windows 11 PHP Version: 8.1.0 Block user comment: N Private report: N New Comment: (https://www.cameo.com/jeremypiven)github.com (https://www.facebook.com/jeremypivenpage/)github.com (https://www.amazon.com/prime-video/actor/Jeremy-Piven/amzn1.dv.gti.785e61d6-1dd8-4777-88c4-b33c24097594)github.com (https://pixarcars.fandom.com/wiki/Jeremy_Piven)github.com (https://www.eonline.com/news/1371236/jeremy-piven-teases-his-idea-for-entourage-reboot)github.com (https://www.rottentomatoes.com/celebrity/jeremy_piven)github.com (https://twitter.com/jeremypiven)github.com (https://www.emmys.com/bios/jeremy-piven)github.com (https://www.blu-ray.com/Jeremy-Piven/70580/)github.com (https://ramentertainment.com/jeremy-piven)github.com (https://podcasts.apple.com/us/podcast/the-big-shark-jeremy-piven/id1558354780?i=1000608694599)github.com (https://www.etonline.com/people/jeremy-piven)github.com (https://www.ibdb.com/broadway-cast-staff/jeremy-piven-405986)github.com (https://abcnews.go.com/GMA/Culture/video/jeremy-piven-talks-new-movie-sweetwater-98145023)github.com (https://www.eonline.com/news/1371236/jeremy-piven-teases-his-idea-for-entourage-reboot)github.com (https://www.youtube.com/watch?v=RtQRmT2cSAM)github.com (https://www.instagram.com/jeremypiven/)github.com (https://www.imdb.com/name/nm0005315/)github.com (https://www.tvguide.com/celebrities/jeremy-piven/credits/3000397119/)github.com (https://www.tcm.com/tcmdb/person/153053%7C174725/Jeremy-Piven#overview)github.com (https://www.bravotv.com/watch-what-happens-live-with-andy-cohen/season-12/episode-96/videos/jeremy-pivens-mercury-poisoning)github.com (https://www.tvinsider.com/people/jeremy-piven/)github.com (https://en.wikipedia.org/wiki/Jeremy_Piven)github.com (https://www.primetimer.com/item/Jeremy-Piven-to-host-celebrity-interview-podcast-How-U-Livin-J-Piven-WoSpdw)github.com (https://www.imdb.com/name/nm0005315/news)github.com (https://en.wikipedia.org/wiki/Jeremy_Piven)github.com (https://www.the-sun.com/entertainment/tv/3810895/jeremy-piven-reveals-entourage-return-woke-twist-ari-gold/)github.com (https://en.wikipedia.org/wiki/Jeremy_Piven)github.com (https://www.imdb.com/title/tt3661590/)github.com Previous Comments: ------------------------------------------------------------------------ [2023-04-21 08:48:13] samira dot akhlaqi314 at gmail dot com To implement ED25519 authentication for mysqlnd, you will need to perform the following steps: Install the libsodium library: ED25519 uses the libsodium library for its implementation, so you will need to install it on your system if you haven't already done so. Generate a public/private key pair: You will need to generate a public/private key pair using the ED25519 algorithm. You can use the sodium_crypto_sign_keypair() function from the libsodium library to generate the key pair. Store the public key in MySQL: You will need to store the public key in MySQL so that it can be used for authentication. You can store it in a dedicated table or in the user table, depending on your preference. Modify the client authentication plugin: You will need to modify the client authentication plugin in mysqlnd to use the ED25519 algorithm for authentication. You can use the sodium_crypto_sign_detached() function from the libsodium library to sign the authentication data using the private key, and then compare it with the stored public key to authenticate the user. (https://www.wyndhamrewards.us/)github.com ------------------------------------------------------------------------ [2021-11-29 11:23:54] cmb@php.net Related To: Bug #81672 ------------------------------------------------------------------------ [2021-11-29 11:22:46] cmb@php.net client_ed25519 is indeed not supported by mysqlnd yet[1]. [1] <https://github.com/php/php-src/blob/php-8.1.0/ext/mysqlnd/mysqlnd_auth.c#L1315-L1326> ------------------------------------------------------------------------ [2021-11-28 21:52:55] williamdes at wdes dot fr FTR: https://github.com/phpmyadmin/phpmyadmin/issues/17200 ------------------------------------------------------------------------ [2021-11-28 13:07:20] arnouxguillaume54 at hotmail dot fr Description: ------------ Hello, I opened a request to phpMyAdmin in which I asked them if it was possible to implement the ed25519 authentication method to connect and I got a response informing me that this authentication system was not implemented in mysqli. So I made the request here. Thank you Test script: --------------- -- Connect into phpMA with the ed25519 method Expected result: ---------------- -- Login successfully Actual result: -------------- The server requested authentication method unknown to the client [client_ed25519] ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81668&edit=1

« previous php.bugs (#244356) next »