php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #81668 Implement ED25519 auth for mysqlnd
Submitted: 2021-11-28 13:07 UTC Modified: 2021-11-29 11:22 UTC
Votes:18
Avg. Score:4.5 ± 1.1
Reproduced:17 of 18 (94.4%)
Same Version:7 (41.2%)
Same OS:3 (17.6%)
From: arnouxguillaume54 at hotmail dot fr Assigned:
Status: Open Package: MySQLi related
PHP Version: 8.1.0 OS: Windows 11
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
17 + 20 = ?
Subscribe to this entry?

 
 [2021-11-28 13:07 UTC] 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]

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-11-28 21:52 UTC] williamdes at wdes dot fr
FTR: https://github.com/phpmyadmin/phpmyadmin/issues/17200
 [2021-11-29 11:22 UTC] cmb@php.net
-Summary: Implements ED25519 +Summary: Implement ED25519 auth for mysqlnd
 [2021-11-29 11:22 UTC] 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>
 [2023-04-21 08:48 UTC] 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
 [2023-05-03 02:33 UTC] kevinsmith at aol dot com
(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
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 16:01:29 2024 UTC