def METHOD_NAME(self, secparam=1024):
    if group.groupSetting() == 'integer':
        if group.p == 0 or group.q == 0:
            group.paramgen(secparam)
        g = group.randomGen()
    elif group.groupSetting() == 'elliptic_curve':
        g = group.random(G)
    # x is private, g is public param
    x = group.random(); h = g ** x
    if debug:
        print('Public parameters...')
        print('h => %s' % h)
        print('g => %s' % g)
        print('Secret key...')
        print('x => %s' % x)
    pk = {'g':g, 'h':h }
    sk = {'x':x}
    return (pk, sk)