Getting Bukkit's keypair

Discussion in 'Plugin Development' started by An0nym8us, Feb 16, 2015.

Thread Status:
Not open for further replies.
  1. Offline



    one, small question: how can I get bukkit's keypair (for encrypting/decrypting data)? Regards :).
  2. Online

    timtower Moderator Moderator

  3. Offline


    @timtower don't worry, not for capturing server-player data and hack something. (anyway if I need it for that, is that neccessary to get answer on that question? ;) )

    I'm writting communicating API and I think this would be best for usage.
  4. Online

    timtower Moderator Moderator

    @An0nym8us A communication API for which you need to have the keypair? What would it even communicate? Why would it need to be that secure?
  5. Offline


    @timtower Why are you asking me about those things?

    Anyway, forget about communication API - simply, need keypair, how can I get it?

    EDIT: Of course, I would answer that questions, but I don't think that's necessary (it's not public project at this time).
    Last edited: Feb 16, 2015
  6. Online

    timtower Moderator Moderator

    @An0nym8us 1. Servers aren't communicating with each other right away, keypair needs to be synched.
    2. Because you ask for something that hasn't been asked before with vague reasons.
    3. You make your own and use sockets.
  7. Offline


    Interestingly sketchy.
  8. Offline


    I know that, I read protocol. I'm writting communication API for server networks (much easier way than BungeeCord's channel messaging) and Ik that server instances would be ran on different server machines, that's why I need encrypting of sending data. I think using Bukkit server's keypair is the clearest way for get keypair (I want to write not amateur, but a bit professional API). Anyway, I'm almost sure that BungeeCord (because on BungeeCord would be instance of Proxy for forwarding API packets to specified server) is collecting server's keypair (easily usage for both sides).
  9. Offline

    1Rogue Retired Staff

    Why not generate your own? You haven't explained what you're even using this for, which means it's either an XY problem or you're doing something extremely sketchy.

    Edit: Now that you've explained, I'll restate my previous question: Why not generate your own?
  10. Offline


    It is, because it's only simple question - how can I get specified object.

    As I said, Bukkit is generating keypair and sending to player. I'm using communication API for server networks, like BungeeCord-based, so Proxy for server-server communication is installed (it's plugin) on BungeeCord instance. I think BungeeCord is storing server's keypairs, so I think I can use their keypairs without generating my own. And annotation - need to know how to get keypair from Bukkit (not asking here for BungeeCord's keypairs).
  11. Online

    timtower Moderator Moderator

    @An0nym8us That would probably require loads of digging with reflection.
  12. Offline


    However I think (now) better would be new KeyPair, bukkit's KeyPair is good solution, but my API (as my every lib-project) is as independent as possible, I coded it for universal usage - not for bukkit, I wrote plugin for Bukkit and for BungeeCord to handle that (server instance is generating their own KeyPair, I don't foresee constructor which allows to deliver custom KeyPair).

    Anyway it's still interesting thing. I found KeyPair field in MinecraftServer class (it's private field, so reflection is required for getting that), but - is there a possibility to get KeyPair via BukkitAPI?
  13. Online

    timtower Moderator Moderator

    @An0nym8us Doubt it as nobody really uses it.
Thread Status:
Not open for further replies.

Share This Page