dongmi4927 2014-11-22 22:41
浏览 50

如何获得Steam公钥?

For this method:

ISteamUserAuth

AuthenticateUser

Version: 1

HTTP Method: POST

Parameters:

Name: steamid

Type: uint64

Optional:

Description: Should be the users steamid, unencrypted.

Parameters:

Name: sessionkey

Type: rawbinary

Optional:

Description: Should be a 32 byte random blob of data, which is then encrypted with RSA using the Steam system's public key. Randomness is important here for security.

Parameters:

Name: encrypted_loginkey

Type: rawbinary

Optional:

Description: Should be the users hashed loginkey, AES encrypted with the sessionkey.

I need 3 parameters. For the second parameter sessionkey, I need to encrypt it using the Steam system's public key. How exactly do I get that?

After some research I figured out that I have to get a public key by using a certificate, and it should look like this.

I am using php, and thus I am using this code to retrieve a public key from a certificate:

<?php
$pub_key = openssl_pkey_get_public(file_get_contents('./cert.crt'));
$keyData = openssl_pkey_get_details($pub_key);
file_put_contents('./key.pub', $keyData['key']);
?>

I am confused as to which certificate do I use. Do I use the certificate of the Steam website? (cert.crt would be the certificate)

  • 写回答

1条回答 默认 最新

  • douxing6532 2014-12-17 22:50
    关注

    I have the same doubt. I'd not tried it yet, but:

    curl -X POST "http://store.steampowered.com/login/getrsakey/" 
         -d username="your_username"
    

    Gives you a RSA key...

    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器