# File lib/net/ssh/buffer.rb, line 244
244:     def read_keyblob(type)
245:       case type
246:         when "ssh-dss"
247:           key = OpenSSL::PKey::DSA.new
248:           key.p = read_bignum
249:           key.q = read_bignum
250:           key.g = read_bignum
251:           key.pub_key = read_bignum
252: 
253:         when "ssh-rsa"
254:           key = OpenSSL::PKey::RSA.new
255:           key.e = read_bignum
256:           key.n = read_bignum
257: 
258:         when /^ecdsa\-sha2\-(\w*)$/
259:           unless defined?(OpenSSL::PKey::EC)
260:             raise NotImplementedError, "unsupported key type `#{type}'"
261:           else
262:             begin
263:               key = OpenSSL::PKey::EC.read_keyblob($1, self)
264:             rescue OpenSSL::PKey::ECError => e
265:               raise NotImplementedError, "unsupported key type `#{type}'"
266:             end
267:           end
268:         else
269:           raise NotImplementedError, "unsupported key type `#{type}'"
270:       end
271: 
272:       return key
273:     end