ユーザーを作成するときに、秘密鍵と公開鍵を作成します。公開鍵は、ユーザーのトークン ID です。秘密鍵は、データの暗号化と復号化に使用されます。
ユーザーがログインすると、私の Android アプリは REST Web サービスを呼び出し、検証後に秘密鍵と公開鍵を返します。次に、アプリは秘密鍵を使用して署名を作成できます。
これは正しい方法ですか?httpsではなくHTTPを使用しています。
これは正しい方法ですか?
いいえ。
httpsではなくHTTPを使用しています。
なんで?他のみんなと同じように HTTPS を使わない理由がわかりません。解決済みの問題です。
誤った記述を修正するには:
PKI について、現在知っているように見えるよりも多くのことを学ぶ必要があります。
The short answer: No
First you are transmitting an private key over unprotected HTTP.
Second it is totally unclear what you want to achieve using a public/private key. From your description I read that you want to use it for authentication and signature. But why is the private key stored on the server?
usually it is the other way around: The client has public and private key. It sends the public key to anybody who wants but th private key NEVER LEAVES THE DEVICE!