grpc 1.54.2 → 1.55.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Makefile +66 -37
- data/include/grpc/impl/grpc_types.h +2 -0
- data/src/core/ext/filters/backend_metrics/backend_metric_filter.cc +1 -1
- data/src/core/ext/filters/client_channel/backend_metric.cc +2 -1
- data/src/core/ext/filters/client_channel/client_channel.cc +13 -17
- data/src/core/ext/filters/client_channel/client_channel.h +20 -16
- data/src/core/ext/filters/client_channel/client_channel_channelz.cc +1 -1
- data/src/core/ext/filters/client_channel/client_channel_internal.h +8 -40
- data/src/core/ext/filters/client_channel/client_channel_service_config.cc +2 -2
- data/src/core/ext/filters/client_channel/config_selector.h +5 -17
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +1 -1
- data/src/core/ext/filters/client_channel/http_proxy.cc +34 -1
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +2 -2
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +1 -1
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +1 -1
- data/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc +5 -5
- data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc +44 -45
- data/src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc +2 -3
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc +4 -4
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +9 -9
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc +4 -4
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc +5 -4
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +19 -118
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.h +30 -0
- data/src/core/ext/filters/client_channel/resolver/dns/dns_resolver_plugin.cc +60 -0
- data/src/core/ext/filters/client_channel/resolver/dns/dns_resolver_plugin.h +27 -0
- data/src/core/ext/filters/client_channel/resolver/dns/event_engine/event_engine_client_channel_resolver.cc +524 -0
- data/src/core/ext/filters/client_channel/resolver/dns/event_engine/event_engine_client_channel_resolver.h +35 -0
- data/src/core/ext/filters/client_channel/resolver/dns/event_engine/service_config_helper.cc +97 -0
- data/src/core/ext/filters/client_channel/resolver/dns/event_engine/service_config_helper.h +32 -0
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +2 -13
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.h +24 -0
- data/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc +3 -2
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +7 -34
- data/src/core/ext/filters/client_channel/retry_filter.cc +23 -55
- data/src/core/ext/filters/client_channel/retry_service_config.cc +8 -8
- data/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.cc +1 -1
- data/src/core/ext/filters/http/message_compress/compression_filter.cc +2 -2
- data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +68 -69
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +78 -23
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +21 -0
- data/src/core/ext/transport/chttp2/transport/context_list_entry.h +70 -0
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +1 -7
- data/src/core/ext/transport/chttp2/transport/frame_ping.h +0 -3
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +1 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +1 -0
- data/src/core/ext/transport/chttp2/transport/internal.h +3 -4
- data/src/core/ext/transport/chttp2/transport/writing.cc +14 -3
- data/src/core/ext/upb-generated/envoy/admin/v3/certs.upb.c +87 -52
- data/src/core/ext/upb-generated/envoy/admin/v3/certs.upb.h +414 -181
- data/src/core/ext/upb-generated/envoy/admin/v3/clusters.upb.c +121 -60
- data/src/core/ext/upb-generated/envoy/admin/v3/clusters.upb.h +481 -224
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c +90 -55
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.h +415 -188
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump_shared.upb.c +357 -210
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump_shared.upb.h +1572 -729
- data/src/core/ext/upb-generated/envoy/admin/v3/init_dump.upb.c +30 -17
- data/src/core/ext/upb-generated/envoy/admin/v3/init_dump.upb.h +144 -47
- data/src/core/ext/upb-generated/envoy/admin/v3/listeners.upb.c +34 -21
- data/src/core/ext/upb-generated/envoy/admin/v3/listeners.upb.h +160 -62
- data/src/core/ext/upb-generated/envoy/admin/v3/memory.upb.c +27 -14
- data/src/core/ext/upb-generated/envoy/admin/v3/memory.upb.h +78 -38
- data/src/core/ext/upb-generated/envoy/admin/v3/metrics.upb.c +20 -11
- data/src/core/ext/upb-generated/envoy/admin/v3/metrics.upb.h +48 -26
- data/src/core/ext/upb-generated/envoy/admin/v3/mutex_stats.upb.c +20 -11
- data/src/core/ext/upb-generated/envoy/admin/v3/mutex_stats.upb.h +48 -26
- data/src/core/ext/upb-generated/envoy/admin/v3/server_info.upb.c +109 -62
- data/src/core/ext/upb-generated/envoy/admin/v3/server_info.upb.h +566 -244
- data/src/core/ext/upb-generated/envoy/admin/v3/tap.upb.c +21 -12
- data/src/core/ext/upb-generated/envoy/admin/v3/tap.upb.h +45 -30
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c +22 -19
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +82 -29
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.c +23 -16
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +45 -30
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c +230 -143
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h +733 -404
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c +417 -264
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h +1839 -899
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c +74 -41
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h +286 -148
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +531 -334
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +2017 -1131
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c +21 -12
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h +45 -30
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.c +89 -52
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h +347 -232
- data/src/core/ext/upb-generated/envoy/config/common/matcher/v3/matcher.upb.c +264 -165
- data/src/core/ext/upb-generated/envoy/config/common/matcher/v3/matcher.upb.h +888 -476
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c +139 -80
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h +527 -274
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.c +22 -13
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h +50 -36
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c +380 -221
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h +1168 -611
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c +166 -94
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h +666 -292
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c +18 -11
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h +37 -26
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c +21 -12
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h +45 -30
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_method_list.upb.c +30 -17
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_method_list.upb.h +144 -47
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c +274 -167
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h +789 -440
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c +228 -137
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h +1100 -501
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.c +22 -13
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h +60 -37
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +350 -211
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +1072 -646
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c +33 -18
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h +117 -51
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.c +34 -19
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.h +118 -56
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.c +38 -21
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h +148 -64
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c +31 -18
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h +143 -65
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.c +22 -13
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.h +51 -37
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c +78 -43
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h +265 -127
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c +145 -88
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h +438 -241
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c +115 -62
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h +559 -227
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.c +18 -11
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h +35 -26
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +175 -118
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +857 -442
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c +172 -95
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h +864 -374
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.c +48 -27
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.h +159 -110
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c +39 -18
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h +74 -56
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/metrics_service.upb.c +28 -15
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/metrics_service.upb.h +71 -45
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c +131 -74
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.h +489 -249
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c +135 -80
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.h +505 -245
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +248 -139
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +933 -433
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +80 -49
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +616 -201
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +1283 -776
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +5422 -2519
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c +49 -28
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h +164 -84
- data/src/core/ext/upb-generated/envoy/config/tap/v3/common.upb.c +228 -141
- data/src/core/ext/upb-generated/envoy/config/tap/v3/common.upb.h +738 -399
- data/src/core/ext/upb-generated/envoy/config/trace/v3/datadog.upb.c +20 -11
- data/src/core/ext/upb-generated/envoy/config/trace/v3/datadog.upb.h +48 -26
- data/src/core/ext/upb-generated/envoy/config/trace/v3/dynamic_ot.upb.c +21 -12
- data/src/core/ext/upb-generated/envoy/config/trace/v3/dynamic_ot.upb.h +45 -30
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c +32 -19
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h +70 -49
- data/src/core/ext/upb-generated/envoy/config/trace/v3/lightstep.upb.c +27 -14
- data/src/core/ext/upb-generated/envoy/config/trace/v3/lightstep.upb.h +110 -43
- data/src/core/ext/upb-generated/envoy/config/trace/v3/opencensus.upb.c +46 -25
- data/src/core/ext/upb-generated/envoy/config/trace/v3/opencensus.upb.h +259 -100
- data/src/core/ext/upb-generated/envoy/config/trace/v3/opentelemetry.upb.c +21 -12
- data/src/core/ext/upb-generated/envoy/config/trace/v3/opentelemetry.upb.h +45 -30
- data/src/core/ext/upb-generated/envoy/config/trace/v3/service.upb.c +18 -11
- data/src/core/ext/upb-generated/envoy/config/trace/v3/service.upb.h +35 -26
- data/src/core/ext/upb-generated/envoy/config/trace/v3/skywalking.upb.c +42 -23
- data/src/core/ext/upb-generated/envoy/config/trace/v3/skywalking.upb.h +108 -70
- data/src/core/ext/upb-generated/envoy/config/trace/v3/trace.upb.c +7 -4
- data/src/core/ext/upb-generated/envoy/config/trace/v3/trace.upb.h +21 -16
- data/src/core/ext/upb-generated/envoy/config/trace/v3/xray.upb.c +43 -24
- data/src/core/ext/upb-generated/envoy/config/trace/v3/xray.upb.h +110 -75
- data/src/core/ext/upb-generated/envoy/config/trace/v3/zipkin.upb.c +30 -17
- data/src/core/ext/upb-generated/envoy/config/trace/v3/zipkin.upb.h +95 -50
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c +16 -9
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.h +73 -23
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c +60 -37
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.h +150 -108
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c +74 -43
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.h +357 -167
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/rbac/v3/rbac.upb.c +44 -25
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/rbac/v3/rbac.upb.h +114 -80
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c +41 -20
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h +245 -82
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb.c +32 -19
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb.h +73 -51
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +474 -296
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +2121 -1076
- data/src/core/ext/upb-generated/envoy/extensions/http/stateful_session/cookie/v3/cookie.upb.c +18 -11
- data/src/core/ext/upb-generated/envoy/extensions/http/stateful_session/cookie/v3/cookie.upb.h +35 -26
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb.c +34 -21
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb.h +112 -78
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/common/v3/common.upb.c +72 -45
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/common/v3/common.upb.h +193 -138
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb.c +34 -21
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb.h +119 -78
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.upb.c +18 -11
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.upb.h +35 -26
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c +7 -4
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h +15 -10
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c +184 -96
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h +907 -360
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c +56 -33
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h +150 -101
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +188 -111
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +816 -419
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb.c +32 -19
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb.h +109 -53
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.c +10 -7
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h +18 -14
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c +300 -177
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h +1284 -522
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c +42 -23
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h +188 -75
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c +130 -83
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.h +510 -238
- data/src/core/ext/upb-generated/envoy/type/http/v3/cookie.upb.c +22 -13
- data/src/core/ext/upb-generated/envoy/type/http/v3/cookie.upb.h +55 -34
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.c +39 -26
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.h +124 -68
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/filter_state.upb.c +21 -12
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/filter_state.upb.h +47 -30
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/http_inputs.upb.c +52 -29
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/http_inputs.upb.h +92 -62
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c +37 -20
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h +133 -63
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c +22 -13
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.h +91 -40
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c +21 -12
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h +50 -32
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c +18 -11
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h +37 -26
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c +46 -27
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h +101 -70
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/status_code_input.upb.c +13 -10
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/status_code_input.upb.h +25 -22
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c +40 -23
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h +161 -75
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c +31 -18
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.h +114 -56
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c +46 -29
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h +139 -91
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c +65 -42
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h +200 -121
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c +80 -45
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h +208 -131
- data/src/core/ext/upb-generated/envoy/type/v3/hash_policy.upb.c +34 -21
- data/src/core/ext/upb-generated/envoy/type/v3/hash_policy.upb.h +74 -53
- data/src/core/ext/upb-generated/envoy/type/v3/http.upb.c +7 -4
- data/src/core/ext/upb-generated/envoy/type/v3/http.upb.h +13 -8
- data/src/core/ext/upb-generated/envoy/type/v3/http_status.upb.c +16 -9
- data/src/core/ext/upb-generated/envoy/type/v3/http_status.upb.h +28 -18
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.c +28 -15
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h +55 -34
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.c +43 -22
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.h +91 -53
- data/src/core/ext/upb-generated/envoy/type/v3/ratelimit_strategy.upb.c +35 -20
- data/src/core/ext/upb-generated/envoy/type/v3/ratelimit_strategy.upb.h +92 -57
- data/src/core/ext/upb-generated/envoy/type/v3/ratelimit_unit.upb.c +7 -4
- data/src/core/ext/upb-generated/envoy/type/v3/ratelimit_unit.upb.h +13 -8
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.c +20 -11
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h +48 -26
- data/src/core/ext/upb-generated/envoy/type/v3/token_bucket.upb.c +23 -14
- data/src/core/ext/upb-generated/envoy/type/v3/token_bucket.upb.h +61 -41
- data/src/core/ext/upb-generated/google/api/annotations.upb.c +14 -11
- data/src/core/ext/upb-generated/google/api/annotations.upb.h +30 -20
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c +255 -154
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h +934 -450
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c +299 -180
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h +946 -483
- data/src/core/ext/upb-generated/google/api/http.upb.c +68 -35
- data/src/core/ext/upb-generated/google/api/http.upb.h +284 -120
- data/src/core/ext/upb-generated/google/api/httpbody.upb.c +22 -13
- data/src/core/ext/upb-generated/google/api/httpbody.upb.h +95 -37
- data/src/core/ext/upb-generated/google/protobuf/any.upb.c +19 -10
- data/src/core/ext/upb-generated/google/protobuf/any.upb.h +38 -22
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +1018 -424
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +3851 -1412
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.c +19 -10
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.h +38 -22
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.c +10 -7
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.h +18 -14
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.c +62 -39
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +207 -102
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c +19 -10
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +38 -22
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c +90 -51
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +157 -107
- data/src/core/ext/upb-generated/google/rpc/status.upb.c +22 -13
- data/src/core/ext/upb-generated/google/rpc/status.upb.h +95 -37
- data/src/core/ext/upb-generated/opencensus/proto/trace/v1/trace_config.upb.c +59 -34
- data/src/core/ext/upb-generated/opencensus/proto/trace/v1/trace_config.upb.h +154 -92
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +43 -24
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +118 -60
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +250 -145
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +919 -415
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c +34 -19
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +76 -51
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c +25 -14
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +45 -30
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +144 -81
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +405 -217
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c +51 -26
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.h +153 -61
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c +173 -102
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.h +855 -298
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c +68 -49
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +155 -104
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.c +26 -17
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.h +55 -34
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c +12 -9
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +31 -14
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.c +26 -17
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.h +55 -34
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c +23 -16
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h +45 -30
- data/src/core/ext/upb-generated/validate/validate.upb.c +845 -455
- data/src/core/ext/upb-generated/validate/validate.upb.h +4347 -1908
- data/src/core/ext/upb-generated/xds/annotations/v3/migrate.upb.c +68 -49
- data/src/core/ext/upb-generated/xds/annotations/v3/migrate.upb.h +155 -104
- data/src/core/ext/upb-generated/xds/annotations/v3/security.upb.c +26 -17
- data/src/core/ext/upb-generated/xds/annotations/v3/security.upb.h +55 -34
- data/src/core/ext/upb-generated/xds/annotations/v3/sensitive.upb.c +12 -9
- data/src/core/ext/upb-generated/xds/annotations/v3/sensitive.upb.h +31 -14
- data/src/core/ext/upb-generated/xds/annotations/v3/status.upb.c +65 -44
- data/src/core/ext/upb-generated/xds/annotations/v3/status.upb.h +137 -91
- data/src/core/ext/upb-generated/xds/annotations/v3/versioning.upb.c +23 -16
- data/src/core/ext/upb-generated/xds/annotations/v3/versioning.upb.h +45 -30
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.c +16 -9
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.h +28 -18
- data/src/core/ext/upb-generated/xds/core/v3/cidr.upb.c +21 -12
- data/src/core/ext/upb-generated/xds/core/v3/cidr.upb.h +45 -30
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c +37 -22
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.h +96 -63
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.c +26 -17
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.h +52 -29
- data/src/core/ext/upb-generated/xds/core/v3/extension.upb.c +21 -12
- data/src/core/ext/upb-generated/xds/core/v3/extension.upb.h +45 -30
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.c +23 -14
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.h +62 -42
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c +44 -25
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.h +169 -79
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c +27 -14
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.h +65 -38
- data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.c +69 -38
- data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.h +167 -76
- data/src/core/ext/upb-generated/xds/service/orca/v3/orca.upb.c +21 -12
- data/src/core/ext/upb-generated/xds/service/orca/v3/orca.upb.h +89 -34
- data/src/core/ext/upb-generated/xds/type/matcher/v3/cel.upb.c +18 -11
- data/src/core/ext/upb-generated/xds/type/matcher/v3/cel.upb.h +35 -26
- data/src/core/ext/upb-generated/xds/type/matcher/v3/domain.upb.c +32 -19
- data/src/core/ext/upb-generated/xds/type/matcher/v3/domain.upb.h +150 -54
- data/src/core/ext/upb-generated/xds/type/matcher/v3/http_inputs.upb.c +10 -7
- data/src/core/ext/upb-generated/xds/type/matcher/v3/http_inputs.upb.h +18 -14
- data/src/core/ext/upb-generated/xds/type/matcher/v3/ip.upb.c +34 -21
- data/src/core/ext/upb-generated/xds/type/matcher/v3/ip.upb.h +161 -63
- data/src/core/ext/upb-generated/xds/type/matcher/v3/matcher.upb.c +162 -101
- data/src/core/ext/upb-generated/xds/type/matcher/v3/matcher.upb.h +501 -293
- data/src/core/ext/upb-generated/xds/type/matcher/v3/range.upb.c +85 -52
- data/src/core/ext/upb-generated/xds/type/matcher/v3/range.upb.h +430 -164
- data/src/core/ext/upb-generated/xds/type/matcher/v3/regex.upb.c +24 -15
- data/src/core/ext/upb-generated/xds/type/matcher/v3/regex.upb.h +53 -37
- data/src/core/ext/upb-generated/xds/type/matcher/v3/string.upb.c +40 -23
- data/src/core/ext/upb-generated/xds/type/matcher/v3/string.upb.h +161 -75
- data/src/core/ext/upb-generated/xds/type/v3/cel.upb.c +37 -22
- data/src/core/ext/upb-generated/xds/type/v3/cel.upb.h +92 -66
- data/src/core/ext/upb-generated/xds/type/v3/range.upb.c +43 -22
- data/src/core/ext/upb-generated/xds/type/v3/range.upb.h +91 -53
- data/src/core/ext/upb-generated/xds/type/v3/typed_struct.upb.c +21 -12
- data/src/core/ext/upb-generated/xds/type/v3/typed_struct.upb.h +45 -30
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/certs.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/certs.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/clusters.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/clusters.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump_shared.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump_shared.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/init_dump.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/init_dump.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/listeners.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/listeners.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/memory.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/memory.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/metrics.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/metrics.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/mutex_stats.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/mutex_stats.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/server_info.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/server_info.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/tap.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/tap.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c +252 -253
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/common/matcher/v3/matcher.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/common/matcher/v3/matcher.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c +13 -12
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.h +11 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_method_list.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_method_list.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c +44 -44
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/metrics_service.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/metrics_service.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/rbac/v3/rbac.upbdefs.c +134 -128
- data/src/core/ext/upbdefs-generated/envoy/config/rbac/v3/rbac.upbdefs.h +11 -5
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/tap/v3/common.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/tap/v3/common.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/datadog.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/datadog.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/dynamic_ot.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/dynamic_ot.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/lightstep.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/lightstep.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/opencensus.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/opencensus.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/opentelemetry.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/opentelemetry.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/service.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/service.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/skywalking.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/skywalking.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/trace.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/trace.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/xray.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/xray.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/zipkin.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/zipkin.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/rbac/v3/rbac.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/rbac/v3/rbac.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +379 -376
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/extensions/http/stateful_session/cookie/v3/cookie.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/extensions/http/stateful_session/cookie/v3/cookie.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +138 -136
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c +12 -13
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/cookie.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/cookie.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/filter_state.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/filter_state.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/http_inputs.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/http_inputs.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/status_code_input.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/status_code_input.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/v3/hash_policy.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/v3/hash_policy.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http_status.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http_status.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/v3/ratelimit_strategy.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/v3/ratelimit_strategy.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/v3/ratelimit_unit.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/v3/ratelimit_unit.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/envoy/type/v3/token_bucket.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/type/v3/token_bucket.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/google/api/expr/v1alpha1/checked.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/google/api/expr/v1alpha1/checked.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/google/api/expr/v1alpha1/syntax.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/google/api/expr/v1alpha1/syntax.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/google/api/httpbody.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/google/api/httpbody.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c +329 -273
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h +11 -5
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/migrate.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/migrate.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/security.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/security.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/sensitive.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/sensitive.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/status.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/status.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/versioning.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/versioning.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/core/v3/cidr.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/core/v3/cidr.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/core/v3/extension.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/core/v3/extension.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/cel.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/cel.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/domain.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/domain.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/http_inputs.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/http_inputs.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/ip.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/ip.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/matcher.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/matcher.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/range.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/range.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/regex.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/regex.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/string.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/string.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/type/v3/cel.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/type/v3/cel.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/type/v3/range.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/type/v3/range.upbdefs.h +6 -5
- data/src/core/ext/upbdefs-generated/xds/type/v3/typed_struct.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/xds/type/v3/typed_struct.upbdefs.h +6 -5
- data/src/core/ext/xds/certificate_provider_store.cc +4 -4
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.cc +7 -7
- data/src/core/ext/xds/upb_utils.h +1 -1
- data/src/core/ext/xds/xds_api.cc +34 -14
- data/src/core/ext/xds/xds_api.h +2 -2
- data/src/core/ext/xds/xds_bootstrap.cc +3 -3
- data/src/core/ext/xds/xds_bootstrap_grpc.cc +15 -15
- data/src/core/ext/xds/xds_client.cc +24 -3
- data/src/core/ext/xds/xds_client.h +1 -1
- data/src/core/ext/xds/xds_cluster.cc +26 -34
- data/src/core/ext/xds/xds_cluster.h +1 -2
- data/src/core/ext/xds/xds_cluster_specifier_plugin.cc +4 -3
- data/src/core/ext/xds/xds_cluster_specifier_plugin.h +2 -2
- data/src/core/ext/xds/xds_common_types.cc +5 -4
- data/src/core/ext/xds/xds_endpoint.cc +5 -2
- data/src/core/ext/xds/xds_endpoint.h +1 -1
- data/src/core/ext/xds/xds_http_fault_filter.cc +2 -2
- data/src/core/ext/xds/xds_http_fault_filter.h +1 -1
- data/src/core/ext/xds/xds_http_filters.h +3 -2
- data/src/core/ext/xds/xds_http_rbac_filter.cc +6 -8
- data/src/core/ext/xds/xds_http_rbac_filter.h +1 -1
- data/src/core/ext/xds/xds_http_stateful_session_filter.cc +2 -2
- data/src/core/ext/xds/xds_http_stateful_session_filter.h +1 -1
- data/src/core/ext/xds/xds_lb_policy_registry.cc +4 -22
- data/src/core/ext/xds/xds_listener.cc +10 -4
- data/src/core/ext/xds/xds_listener.h +1 -1
- data/src/core/ext/xds/xds_resource_type.h +2 -2
- data/src/core/ext/xds/xds_route_config.cc +8 -5
- data/src/core/ext/xds/xds_route_config.h +1 -1
- data/src/core/lib/channel/channelz.cc +5 -4
- data/src/core/lib/channel/channelz_registry.cc +7 -6
- data/src/core/lib/channel/connected_channel.cc +82 -27
- data/src/core/lib/channel/promise_based_filter.cc +2 -8
- data/src/core/lib/debug/trace.cc +16 -7
- data/src/core/lib/debug/trace.h +12 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +8 -26
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +6 -1
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h +3 -0
- data/src/core/lib/event_engine/shim.cc +2 -0
- data/src/core/lib/event_engine/trace.cc +1 -0
- data/src/core/lib/event_engine/trace.h +6 -0
- data/src/core/lib/experiments/experiments.cc +3 -0
- data/src/core/lib/experiments/experiments.h +4 -1
- data/src/core/lib/gpr/posix/time.cc +5 -0
- data/src/core/lib/gprpp/status_helper.cc +2 -2
- data/src/core/lib/gprpp/validation_errors.cc +8 -3
- data/src/core/lib/gprpp/validation_errors.h +16 -9
- data/src/core/lib/iomgr/buffer_list.h +0 -1
- data/src/core/lib/iomgr/socket_utils_posix.cc +3 -0
- data/src/core/lib/iomgr/socket_utils_posix.h +3 -0
- data/src/core/lib/iomgr/tcp_client_posix.cc +4 -0
- data/src/core/lib/iomgr/timer_generic.cc +17 -16
- data/src/core/lib/json/json.h +61 -113
- data/src/core/lib/json/json_object_loader.cc +20 -20
- data/src/core/lib/json/json_object_loader.h +8 -3
- data/src/core/lib/json/json_reader.cc +58 -38
- data/src/core/lib/json/json_reader.h +34 -0
- data/src/core/lib/json/json_util.cc +6 -6
- data/src/core/lib/json/json_util.h +5 -4
- data/src/core/lib/json/json_writer.cc +19 -19
- data/src/core/lib/json/json_writer.h +33 -0
- data/src/core/lib/load_balancing/lb_policy_registry.cc +7 -7
- data/src/core/lib/promise/pipe.h +7 -0
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +35 -37
- data/src/core/lib/security/credentials/external/external_account_credentials.cc +60 -62
- data/src/core/lib/security/credentials/external/file_external_account_credentials.cc +22 -21
- data/src/core/lib/security/credentials/external/url_external_account_credentials.cc +28 -27
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +4 -2
- data/src/core/lib/security/credentials/jwt/json_token.cc +6 -4
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +8 -5
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +39 -38
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +17 -16
- data/src/core/lib/security/util/json_util.cc +5 -5
- data/src/core/lib/service_config/service_config_impl.cc +11 -5
- data/src/core/lib/slice/slice.h +2 -0
- data/src/core/lib/surface/call.cc +71 -26
- data/src/core/lib/surface/call.h +1 -5
- data/src/core/lib/surface/completion_queue.cc +2 -1
- data/src/core/lib/surface/server.cc +47 -19
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/batch_builder.h +9 -1
- data/src/core/lib/transport/metadata_batch.h +2 -59
- data/src/core/lib/transport/metadata_compression_traits.h +67 -0
- data/src/core/lib/transport/simple_slice_based_metadata.h +48 -0
- data/src/core/lib/transport/transport.h +3 -0
- data/src/core/plugin_registry/grpc_plugin_registry.cc +2 -4
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/third_party/abseil-cpp/absl/base/config.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio_mem.c +33 -47
- data/third_party/boringssl-with-bazel/src/crypto/bio/fd.c +7 -4
- data/third_party/boringssl-with-bazel/src/crypto/kyber/internal.h +32 -2
- data/third_party/boringssl-with-bazel/src/crypto/kyber/keccak.c +11 -12
- data/third_party/boringssl-with-bazel/src/crypto/kyber/kyber.c +826 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.c +10 -12
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/voprf.c +8 -10
- data/third_party/boringssl-with-bazel/src/crypto/x509/by_dir.c +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/internal.h +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/policy.c +18 -14
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_lu.c +17 -21
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.c +7 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c +3 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vpm.c +1 -72
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_crl.c +4 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_lib.c +4 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c +7 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_utl.c +4 -2
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/bio.h +8 -8
- data/third_party/boringssl-with-bazel/src/include/openssl/kyber.h +128 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/obj.h +8 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/stack.h +8 -12
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +1 -10
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +9 -2
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +17 -17
- data/third_party/boringssl-with-bazel/src/ssl/ssl_asn1.cc +8 -4
- data/third_party/boringssl-with-bazel/src/ssl/ssl_file.cc +2 -2
- data/third_party/boringssl-with-bazel/src/ssl/ssl_key_share.cc +72 -5
- data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +19 -21
- data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +2 -1
- data/third_party/upb/upb/{table_internal.h → alloc.h} +6 -6
- data/third_party/upb/upb/arena.h +4 -193
- data/third_party/upb/upb/array.h +4 -51
- data/third_party/upb/upb/base/descriptor_constants.h +104 -0
- data/third_party/upb/upb/base/log2.h +57 -0
- data/third_party/upb/upb/{status.c → base/status.c} +2 -7
- data/third_party/upb/upb/base/status.h +66 -0
- data/third_party/upb/upb/base/string_view.h +75 -0
- data/third_party/upb/upb/{array.c → collections/array.c} +67 -36
- data/third_party/upb/upb/collections/array.h +85 -0
- data/third_party/upb/upb/collections/array_internal.h +135 -0
- data/third_party/upb/upb/{map.c → collections/map.c} +53 -26
- data/third_party/upb/upb/collections/map.h +135 -0
- data/third_party/upb/upb/collections/map_gencode_util.h +78 -0
- data/third_party/upb/upb/collections/map_internal.h +170 -0
- data/third_party/upb/upb/collections/map_sorter.c +166 -0
- data/third_party/upb/upb/collections/map_sorter_internal.h +109 -0
- data/third_party/upb/upb/{message_value.h → collections/message_value.h} +12 -13
- data/third_party/upb/upb/decode.h +3 -62
- data/third_party/upb/upb/def.h +4 -384
- data/third_party/upb/upb/def.hpp +3 -411
- data/third_party/upb/upb/encode.h +3 -48
- data/third_party/upb/upb/extension_registry.h +3 -52
- data/third_party/upb/upb/{table.c → hash/common.c} +52 -110
- data/third_party/upb/upb/hash/common.h +199 -0
- data/third_party/upb/upb/hash/int_table.h +102 -0
- data/third_party/upb/upb/hash/str_table.h +161 -0
- data/third_party/upb/upb/{json_decode.c → json/decode.c} +63 -98
- data/third_party/upb/upb/json/decode.h +52 -0
- data/third_party/upb/upb/{json_encode.c → json/encode.c} +69 -45
- data/third_party/upb/upb/json/encode.h +70 -0
- data/third_party/upb/upb/json_decode.h +4 -15
- data/third_party/upb/upb/json_encode.h +4 -33
- data/third_party/upb/upb/lex/atoi.c +68 -0
- data/third_party/upb/upb/lex/atoi.h +53 -0
- data/third_party/upb/upb/{upb.c → lex/round_trip.c} +2 -11
- data/third_party/upb/upb/{internal/upb.h → lex/round_trip.h} +17 -30
- data/third_party/upb/upb/lex/strtod.c +97 -0
- data/third_party/upb/upb/lex/strtod.h +46 -0
- data/third_party/upb/upb/lex/unicode.c +57 -0
- data/third_party/upb/upb/lex/unicode.h +77 -0
- data/third_party/upb/upb/map.h +4 -85
- data/third_party/upb/upb/mem/alloc.c +47 -0
- data/third_party/upb/upb/mem/alloc.h +98 -0
- data/third_party/upb/upb/mem/arena.c +367 -0
- data/third_party/upb/upb/mem/arena.h +160 -0
- data/third_party/upb/upb/mem/arena_internal.h +114 -0
- data/third_party/upb/upb/message/accessors.c +68 -0
- data/third_party/upb/upb/message/accessors.h +379 -0
- data/third_party/upb/upb/message/accessors_internal.h +325 -0
- data/third_party/upb/upb/message/extension_internal.h +83 -0
- data/third_party/upb/upb/message/internal.h +135 -0
- data/third_party/upb/upb/message/message.c +180 -0
- data/third_party/upb/upb/message/message.h +69 -0
- data/third_party/upb/upb/mini_table/common.c +128 -0
- data/third_party/upb/upb/mini_table/common.h +170 -0
- data/third_party/upb/upb/mini_table/common_internal.h +111 -0
- data/third_party/upb/upb/{mini_table.c → mini_table/decode.c} +513 -533
- data/third_party/upb/upb/mini_table/decode.h +179 -0
- data/third_party/upb/upb/mini_table/encode.c +300 -0
- data/third_party/upb/upb/mini_table/encode_internal.h +111 -0
- data/third_party/upb/upb/{mini_table.hpp → mini_table/encode_internal.hpp} +32 -8
- data/third_party/upb/upb/mini_table/enum_internal.h +88 -0
- data/third_party/upb/upb/mini_table/extension_internal.h +47 -0
- data/third_party/upb/upb/{extension_registry.c → mini_table/extension_registry.c} +27 -24
- data/third_party/upb/upb/mini_table/extension_registry.h +104 -0
- data/third_party/upb/upb/mini_table/field_internal.h +192 -0
- data/third_party/upb/upb/mini_table/file_internal.h +47 -0
- data/third_party/upb/upb/mini_table/message_internal.h +136 -0
- data/third_party/upb/upb/mini_table/sub_internal.h +38 -0
- data/third_party/upb/upb/mini_table/types.h +40 -0
- data/third_party/upb/upb/mini_table.h +4 -157
- data/third_party/upb/upb/msg.h +3 -38
- data/third_party/upb/upb/port/atomic.h +101 -0
- data/third_party/upb/upb/{port_def.inc → port/def.inc} +94 -27
- data/third_party/upb/upb/{port_undef.inc → port/undef.inc} +13 -3
- data/third_party/upb/upb/{internal → port}/vsnprintf_compat.h +5 -7
- data/third_party/upb/upb/reflection/common.h +67 -0
- data/third_party/upb/upb/reflection/def.h +42 -0
- data/third_party/upb/upb/reflection/def.hpp +610 -0
- data/third_party/upb/upb/reflection/def_builder.c +357 -0
- data/third_party/upb/upb/reflection/def_builder_internal.h +157 -0
- data/third_party/upb/upb/reflection/def_pool.c +462 -0
- data/third_party/upb/upb/reflection/def_pool.h +108 -0
- data/third_party/upb/upb/reflection/def_pool_internal.h +77 -0
- data/third_party/upb/upb/reflection/def_type.c +50 -0
- data/third_party/upb/upb/reflection/def_type.h +81 -0
- data/third_party/upb/upb/reflection/desc_state.c +53 -0
- data/third_party/upb/upb/reflection/desc_state_internal.h +64 -0
- data/third_party/upb/upb/reflection/enum_def.c +310 -0
- data/third_party/upb/upb/reflection/enum_def.h +80 -0
- data/third_party/upb/upb/reflection/enum_def_internal.h +56 -0
- data/third_party/upb/upb/reflection/enum_reserved_range.c +84 -0
- data/third_party/upb/upb/reflection/enum_reserved_range.h +51 -0
- data/third_party/upb/upb/reflection/enum_reserved_range_internal.h +55 -0
- data/third_party/upb/upb/reflection/enum_value_def.c +144 -0
- data/third_party/upb/upb/reflection/enum_value_def.h +57 -0
- data/third_party/upb/upb/reflection/enum_value_def_internal.h +57 -0
- data/third_party/upb/upb/reflection/extension_range.c +93 -0
- data/third_party/upb/upb/reflection/extension_range.h +55 -0
- data/third_party/upb/upb/reflection/extension_range_internal.h +54 -0
- data/third_party/upb/upb/reflection/field_def.c +930 -0
- data/third_party/upb/upb/reflection/field_def.h +91 -0
- data/third_party/upb/upb/reflection/field_def_internal.h +76 -0
- data/third_party/upb/upb/reflection/file_def.c +370 -0
- data/third_party/upb/upb/reflection/file_def.h +77 -0
- data/third_party/upb/upb/reflection/file_def_internal.h +57 -0
- data/third_party/upb/upb/reflection/message.c +233 -0
- data/third_party/upb/upb/reflection/message.h +102 -0
- data/third_party/upb/upb/reflection/message.hpp +37 -0
- data/third_party/upb/upb/reflection/message_def.c +718 -0
- data/third_party/upb/upb/reflection/message_def.h +174 -0
- data/third_party/upb/upb/reflection/message_def_internal.h +63 -0
- data/third_party/upb/upb/reflection/message_reserved_range.c +81 -0
- data/third_party/upb/upb/reflection/message_reserved_range.h +51 -0
- data/third_party/upb/upb/reflection/message_reserved_range_internal.h +55 -0
- data/third_party/upb/upb/reflection/method_def.c +124 -0
- data/third_party/upb/upb/reflection/method_def.h +59 -0
- data/third_party/upb/upb/reflection/method_def_internal.h +53 -0
- data/third_party/upb/upb/reflection/oneof_def.c +226 -0
- data/third_party/upb/upb/reflection/oneof_def.h +66 -0
- data/third_party/upb/upb/reflection/oneof_def_internal.h +57 -0
- data/third_party/upb/upb/reflection/service_def.c +128 -0
- data/third_party/upb/upb/reflection/service_def.h +60 -0
- data/third_party/upb/upb/reflection/service_def_internal.h +53 -0
- data/third_party/upb/upb/reflection.h +4 -78
- data/third_party/upb/upb/reflection.hpp +3 -7
- data/third_party/upb/upb/status.h +4 -34
- data/third_party/upb/upb/{collections.h → string_view.h} +7 -7
- data/third_party/upb/upb/{text_encode.c → text/encode.c} +74 -70
- data/third_party/upb/upb/text/encode.h +69 -0
- data/third_party/upb/upb/text_encode.h +4 -32
- data/third_party/upb/upb/upb.h +6 -151
- data/third_party/upb/upb/upb.hpp +10 -18
- data/third_party/upb/upb/wire/common.h +44 -0
- data/third_party/upb/upb/wire/common_internal.h +50 -0
- data/third_party/upb/upb/wire/decode.c +1343 -0
- data/third_party/upb/upb/wire/decode.h +108 -0
- data/third_party/upb/upb/{decode_fast.c → wire/decode_fast.c} +184 -225
- data/third_party/upb/upb/{decode_fast.h → wire/decode_fast.h} +21 -7
- data/third_party/upb/upb/{internal/decode.h → wire/decode_internal.h} +44 -92
- data/third_party/upb/upb/{encode.c → wire/encode.c} +114 -95
- data/third_party/upb/upb/wire/encode.h +92 -0
- data/third_party/upb/upb/wire/eps_copy_input_stream.c +39 -0
- data/third_party/upb/upb/wire/eps_copy_input_stream.h +425 -0
- data/third_party/upb/upb/wire/reader.c +67 -0
- data/third_party/upb/upb/wire/reader.h +227 -0
- data/third_party/upb/upb/wire/swap_internal.h +63 -0
- data/third_party/upb/upb/wire/types.h +41 -0
- data/third_party/{upb/third_party/utf8_range → utf8_range}/range2-neon.c +1 -1
- data/third_party/{upb/third_party/utf8_range → utf8_range}/utf8_range.h +12 -0
- metadata +155 -40
- data/src/core/ext/transport/chttp2/transport/context_list.cc +0 -71
- data/src/core/ext/transport/chttp2/transport/context_list.h +0 -54
- data/third_party/upb/upb/arena.c +0 -277
- data/third_party/upb/upb/decode.c +0 -1221
- data/third_party/upb/upb/def.c +0 -3269
- data/third_party/upb/upb/internal/table.h +0 -385
- data/third_party/upb/upb/msg.c +0 -368
- data/third_party/upb/upb/msg_internal.h +0 -837
- data/third_party/upb/upb/reflection.c +0 -323
- /data/third_party/{upb/third_party/utf8_range → utf8_range}/naive.c +0 -0
- /data/third_party/{upb/third_party/utf8_range → utf8_range}/range2-sse.c +0 -0
@@ -0,0 +1,826 @@
|
|
1
|
+
/* Copyright (c) 2023, Google Inc.
|
2
|
+
*
|
3
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
4
|
+
* purpose with or without fee is hereby granted, provided that the above
|
5
|
+
* copyright notice and this permission notice appear in all copies.
|
6
|
+
*
|
7
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
8
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
9
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
10
|
+
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
11
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
12
|
+
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
13
|
+
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
|
14
|
+
|
15
|
+
#include <openssl/kyber.h>
|
16
|
+
|
17
|
+
#include <assert.h>
|
18
|
+
#include <stdlib.h>
|
19
|
+
|
20
|
+
#include <openssl/bytestring.h>
|
21
|
+
#include <openssl/rand.h>
|
22
|
+
|
23
|
+
#include "../internal.h"
|
24
|
+
#include "./internal.h"
|
25
|
+
|
26
|
+
|
27
|
+
// See
|
28
|
+
// https://pq-crystals.org/kyber/data/kyber-specification-round3-20210804.pdf
|
29
|
+
|
30
|
+
#define DEGREE 256
|
31
|
+
#define RANK 3
|
32
|
+
|
33
|
+
static const size_t kBarrettMultiplier = 5039;
|
34
|
+
static const unsigned kBarrettShift = 24;
|
35
|
+
static const uint16_t kPrime = 3329;
|
36
|
+
static const int kLog2Prime = 12;
|
37
|
+
static const uint16_t kHalfPrime = (/*kPrime=*/3329 - 1) / 2;
|
38
|
+
static const int kDU = 10;
|
39
|
+
static const int kDV = 4;
|
40
|
+
// kInverseDegree is 128^-1 mod 3329; 128 because kPrime does not have a 512th
|
41
|
+
// root of unity.
|
42
|
+
static const uint16_t kInverseDegree = 3303;
|
43
|
+
static const size_t kEncodedVectorSize =
|
44
|
+
(/*kLog2Prime=*/12 * DEGREE / 8) * RANK;
|
45
|
+
static const size_t kCompressedVectorSize = /*kDU=*/10 * RANK * DEGREE / 8;
|
46
|
+
|
47
|
+
typedef struct scalar {
|
48
|
+
// On every function entry and exit, 0 <= c < kPrime.
|
49
|
+
uint16_t c[DEGREE];
|
50
|
+
} scalar;
|
51
|
+
|
52
|
+
typedef struct vector {
|
53
|
+
scalar v[RANK];
|
54
|
+
} vector;
|
55
|
+
|
56
|
+
typedef struct matrix {
|
57
|
+
scalar v[RANK][RANK];
|
58
|
+
} matrix;
|
59
|
+
|
60
|
+
// This bit of Python will be referenced in some of the following comments:
|
61
|
+
//
|
62
|
+
// p = 3329
|
63
|
+
//
|
64
|
+
// def bitreverse(i):
|
65
|
+
// ret = 0
|
66
|
+
// for n in range(7):
|
67
|
+
// bit = i & 1
|
68
|
+
// ret <<= 1
|
69
|
+
// ret |= bit
|
70
|
+
// i >>= 1
|
71
|
+
// return ret
|
72
|
+
|
73
|
+
// kNTTRoots = [pow(17, bitreverse(i), p) for i in range(128)]
|
74
|
+
static const uint16_t kNTTRoots[128] = {
|
75
|
+
1, 1729, 2580, 3289, 2642, 630, 1897, 848, 1062, 1919, 193, 797,
|
76
|
+
2786, 3260, 569, 1746, 296, 2447, 1339, 1476, 3046, 56, 2240, 1333,
|
77
|
+
1426, 2094, 535, 2882, 2393, 2879, 1974, 821, 289, 331, 3253, 1756,
|
78
|
+
1197, 2304, 2277, 2055, 650, 1977, 2513, 632, 2865, 33, 1320, 1915,
|
79
|
+
2319, 1435, 807, 452, 1438, 2868, 1534, 2402, 2647, 2617, 1481, 648,
|
80
|
+
2474, 3110, 1227, 910, 17, 2761, 583, 2649, 1637, 723, 2288, 1100,
|
81
|
+
1409, 2662, 3281, 233, 756, 2156, 3015, 3050, 1703, 1651, 2789, 1789,
|
82
|
+
1847, 952, 1461, 2687, 939, 2308, 2437, 2388, 733, 2337, 268, 641,
|
83
|
+
1584, 2298, 2037, 3220, 375, 2549, 2090, 1645, 1063, 319, 2773, 757,
|
84
|
+
2099, 561, 2466, 2594, 2804, 1092, 403, 1026, 1143, 2150, 2775, 886,
|
85
|
+
1722, 1212, 1874, 1029, 2110, 2935, 885, 2154,
|
86
|
+
};
|
87
|
+
|
88
|
+
// kInverseNTTRoots = [pow(17, -bitreverse(i), p) for i in range(128)]
|
89
|
+
static const uint16_t kInverseNTTRoots[128] = {
|
90
|
+
1, 1600, 40, 749, 2481, 1432, 2699, 687, 1583, 2760, 69, 543,
|
91
|
+
2532, 3136, 1410, 2267, 2508, 1355, 450, 936, 447, 2794, 1235, 1903,
|
92
|
+
1996, 1089, 3273, 283, 1853, 1990, 882, 3033, 2419, 2102, 219, 855,
|
93
|
+
2681, 1848, 712, 682, 927, 1795, 461, 1891, 2877, 2522, 1894, 1010,
|
94
|
+
1414, 2009, 3296, 464, 2697, 816, 1352, 2679, 1274, 1052, 1025, 2132,
|
95
|
+
1573, 76, 2998, 3040, 1175, 2444, 394, 1219, 2300, 1455, 2117, 1607,
|
96
|
+
2443, 554, 1179, 2186, 2303, 2926, 2237, 525, 735, 863, 2768, 1230,
|
97
|
+
2572, 556, 3010, 2266, 1684, 1239, 780, 2954, 109, 1292, 1031, 1745,
|
98
|
+
2688, 3061, 992, 2596, 941, 892, 1021, 2390, 642, 1868, 2377, 1482,
|
99
|
+
1540, 540, 1678, 1626, 279, 314, 1173, 2573, 3096, 48, 667, 1920,
|
100
|
+
2229, 1041, 2606, 1692, 680, 2746, 568, 3312,
|
101
|
+
};
|
102
|
+
|
103
|
+
// kModRoots = [pow(17, 2*bitreverse(i) + 1, p) for i in range(128)]
|
104
|
+
static const uint16_t kModRoots[128] = {
|
105
|
+
17, 3312, 2761, 568, 583, 2746, 2649, 680, 1637, 1692, 723, 2606,
|
106
|
+
2288, 1041, 1100, 2229, 1409, 1920, 2662, 667, 3281, 48, 233, 3096,
|
107
|
+
756, 2573, 2156, 1173, 3015, 314, 3050, 279, 1703, 1626, 1651, 1678,
|
108
|
+
2789, 540, 1789, 1540, 1847, 1482, 952, 2377, 1461, 1868, 2687, 642,
|
109
|
+
939, 2390, 2308, 1021, 2437, 892, 2388, 941, 733, 2596, 2337, 992,
|
110
|
+
268, 3061, 641, 2688, 1584, 1745, 2298, 1031, 2037, 1292, 3220, 109,
|
111
|
+
375, 2954, 2549, 780, 2090, 1239, 1645, 1684, 1063, 2266, 319, 3010,
|
112
|
+
2773, 556, 757, 2572, 2099, 1230, 561, 2768, 2466, 863, 2594, 735,
|
113
|
+
2804, 525, 1092, 2237, 403, 2926, 1026, 2303, 1143, 2186, 2150, 1179,
|
114
|
+
2775, 554, 886, 2443, 1722, 1607, 1212, 2117, 1874, 1455, 1029, 2300,
|
115
|
+
2110, 1219, 2935, 394, 885, 2444, 2154, 1175,
|
116
|
+
};
|
117
|
+
|
118
|
+
// reduce_once reduces 0 <= x < 2*kPrime, mod kPrime.
|
119
|
+
static uint16_t reduce_once(uint16_t x) {
|
120
|
+
assert(x < 2 * kPrime);
|
121
|
+
const uint16_t subtracted = x - kPrime;
|
122
|
+
uint16_t mask = 0u - (subtracted >> 15);
|
123
|
+
// On Aarch64, omitting a |value_barrier_u16| results in a 2x speedup of Kyber
|
124
|
+
// overall and Clang still produces constant-time code using `csel`. On other
|
125
|
+
// platforms & compilers on godbolt that we care about, this code also
|
126
|
+
// produces constant-time output.
|
127
|
+
return (mask & x) | (~mask & subtracted);
|
128
|
+
}
|
129
|
+
|
130
|
+
// constant time reduce x mod kPrime using Barrett reduction. x must be less
|
131
|
+
// than kPrime + 2×kPrime².
|
132
|
+
static uint16_t reduce(uint32_t x) {
|
133
|
+
assert(x < kPrime + 2u * kPrime * kPrime);
|
134
|
+
uint64_t product = (uint64_t)x * kBarrettMultiplier;
|
135
|
+
uint32_t quotient = product >> kBarrettShift;
|
136
|
+
uint32_t remainder = x - quotient * kPrime;
|
137
|
+
return reduce_once(remainder);
|
138
|
+
}
|
139
|
+
|
140
|
+
static void scalar_zero(scalar *out) { OPENSSL_memset(out, 0, sizeof(*out)); }
|
141
|
+
|
142
|
+
static void vector_zero(vector *out) { OPENSSL_memset(out, 0, sizeof(*out)); }
|
143
|
+
|
144
|
+
// In place number theoretic transform of a given scalar.
|
145
|
+
// Note that Kyber's kPrime 3329 does not have a 512th root of unity, so this
|
146
|
+
// transform leaves off the last iteration of the usual FFT code, with the 128
|
147
|
+
// relevant roots of unity being stored in |kNTTRoots|. This means the output
|
148
|
+
// should be seen as 128 elements in GF(3329^2), with the coefficients of the
|
149
|
+
// elements being consecutive entries in |s->c|.
|
150
|
+
static void scalar_ntt(scalar *s) {
|
151
|
+
int offset = DEGREE;
|
152
|
+
// `int` is used here because using `size_t` throughout caused a ~5% slowdown
|
153
|
+
// with Clang 14 on Aarch64.
|
154
|
+
for (int step = 1; step < DEGREE / 2; step <<= 1) {
|
155
|
+
offset >>= 1;
|
156
|
+
int k = 0;
|
157
|
+
for (int i = 0; i < step; i++) {
|
158
|
+
const uint32_t step_root = kNTTRoots[i + step];
|
159
|
+
for (int j = k; j < k + offset; j++) {
|
160
|
+
uint16_t odd = reduce(step_root * s->c[j + offset]);
|
161
|
+
uint16_t even = s->c[j];
|
162
|
+
s->c[j] = reduce_once(odd + even);
|
163
|
+
s->c[j + offset] = reduce_once(even - odd + kPrime);
|
164
|
+
}
|
165
|
+
k += 2 * offset;
|
166
|
+
}
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
170
|
+
static void vector_ntt(vector *a) {
|
171
|
+
for (int i = 0; i < RANK; i++) {
|
172
|
+
scalar_ntt(&a->v[i]);
|
173
|
+
}
|
174
|
+
}
|
175
|
+
|
176
|
+
// In place inverse number theoretic transform of a given scalar, with pairs of
|
177
|
+
// entries of s->v being interpreted as elements of GF(3329^2). Just as with the
|
178
|
+
// number theoretic transform, this leaves off the first step of the normal iFFT
|
179
|
+
// to account for the fact that 3329 does not have a 512th root of unity, using
|
180
|
+
// the precomputed 128 roots of unity stored in |kInverseNTTRoots|.
|
181
|
+
static void scalar_inverse_ntt(scalar *s) {
|
182
|
+
int step = DEGREE / 2;
|
183
|
+
// `int` is used here because using `size_t` throughout caused a ~5% slowdown
|
184
|
+
// with Clang 14 on Aarch64.
|
185
|
+
for (int offset = 2; offset < DEGREE; offset <<= 1) {
|
186
|
+
step >>= 1;
|
187
|
+
int k = 0;
|
188
|
+
for (int i = 0; i < step; i++) {
|
189
|
+
uint32_t step_root = kInverseNTTRoots[i + step];
|
190
|
+
for (int j = k; j < k + offset; j++) {
|
191
|
+
uint16_t odd = s->c[j + offset];
|
192
|
+
uint16_t even = s->c[j];
|
193
|
+
s->c[j] = reduce_once(odd + even);
|
194
|
+
s->c[j + offset] = reduce(step_root * (even - odd + kPrime));
|
195
|
+
}
|
196
|
+
k += 2 * offset;
|
197
|
+
}
|
198
|
+
}
|
199
|
+
for (int i = 0; i < DEGREE; i++) {
|
200
|
+
s->c[i] = reduce(s->c[i] * kInverseDegree);
|
201
|
+
}
|
202
|
+
}
|
203
|
+
|
204
|
+
static void vector_inverse_ntt(vector *a) {
|
205
|
+
for (int i = 0; i < RANK; i++) {
|
206
|
+
scalar_inverse_ntt(&a->v[i]);
|
207
|
+
}
|
208
|
+
}
|
209
|
+
|
210
|
+
static void scalar_add(scalar *lhs, const scalar *rhs) {
|
211
|
+
for (int i = 0; i < DEGREE; i++) {
|
212
|
+
lhs->c[i] = reduce_once(lhs->c[i] + rhs->c[i]);
|
213
|
+
}
|
214
|
+
}
|
215
|
+
|
216
|
+
static void scalar_sub(scalar *lhs, const scalar *rhs) {
|
217
|
+
for (int i = 0; i < DEGREE; i++) {
|
218
|
+
lhs->c[i] = reduce_once(lhs->c[i] - rhs->c[i] + kPrime);
|
219
|
+
}
|
220
|
+
}
|
221
|
+
|
222
|
+
// Multiplying two scalars in the number theoretically transformed state. Since
|
223
|
+
// 3329 does not have a 512th root of unity, this means we have to interpret
|
224
|
+
// the 2*ith and (2*i+1)th entries of the scalar as elements of GF(3329)[X]/(X^2
|
225
|
+
// - 17^(2*bitreverse(i)+1)) The value of 17^(2*bitreverse(i)+1) mod 3329 is
|
226
|
+
// stored in the precomputed |kModRoots| table. Note that our Barrett transform
|
227
|
+
// only allows us to multipy two reduced numbers together, so we need some
|
228
|
+
// intermediate reduction steps, even if an uint64_t could hold 3 multiplied
|
229
|
+
// numbers.
|
230
|
+
static void scalar_mult(scalar *out, const scalar *lhs, const scalar *rhs) {
|
231
|
+
for (int i = 0; i < DEGREE / 2; i++) {
|
232
|
+
uint32_t real_real = (uint32_t)lhs->c[2 * i] * rhs->c[2 * i];
|
233
|
+
uint32_t img_img = (uint32_t)rhs->c[2 * i + 1] * lhs->c[2 * i + 1];
|
234
|
+
uint32_t real_img = (uint32_t)lhs->c[2 * i] * rhs->c[2 * i + 1];
|
235
|
+
uint32_t img_real = (uint32_t)lhs->c[2 * i + 1] * rhs->c[2 * i];
|
236
|
+
out->c[2 * i] =
|
237
|
+
reduce(real_real + (uint32_t)reduce(img_img) * kModRoots[i]);
|
238
|
+
out->c[2 * i + 1] = reduce(img_real + real_img);
|
239
|
+
}
|
240
|
+
}
|
241
|
+
|
242
|
+
static void vector_add(vector *lhs, const vector *rhs) {
|
243
|
+
for (int i = 0; i < RANK; i++) {
|
244
|
+
scalar_add(&lhs->v[i], &rhs->v[i]);
|
245
|
+
}
|
246
|
+
}
|
247
|
+
|
248
|
+
static void matrix_mult(vector *out, const matrix *m, const vector *a) {
|
249
|
+
vector_zero(out);
|
250
|
+
for (int i = 0; i < RANK; i++) {
|
251
|
+
for (int j = 0; j < RANK; j++) {
|
252
|
+
scalar product;
|
253
|
+
scalar_mult(&product, &m->v[i][j], &a->v[j]);
|
254
|
+
scalar_add(&out->v[i], &product);
|
255
|
+
}
|
256
|
+
}
|
257
|
+
}
|
258
|
+
|
259
|
+
static void matrix_mult_transpose(vector *out, const matrix *m,
|
260
|
+
const vector *a) {
|
261
|
+
vector_zero(out);
|
262
|
+
for (int i = 0; i < RANK; i++) {
|
263
|
+
for (int j = 0; j < RANK; j++) {
|
264
|
+
scalar product;
|
265
|
+
scalar_mult(&product, &m->v[j][i], &a->v[j]);
|
266
|
+
scalar_add(&out->v[i], &product);
|
267
|
+
}
|
268
|
+
}
|
269
|
+
}
|
270
|
+
|
271
|
+
static void scalar_inner_product(scalar *out, const vector *lhs,
|
272
|
+
const vector *rhs) {
|
273
|
+
scalar_zero(out);
|
274
|
+
for (int i = 0; i < RANK; i++) {
|
275
|
+
scalar product;
|
276
|
+
scalar_mult(&product, &lhs->v[i], &rhs->v[i]);
|
277
|
+
scalar_add(out, &product);
|
278
|
+
}
|
279
|
+
}
|
280
|
+
|
281
|
+
// Algorithm 1 of the Kyber spec. Rejection samples a Keccak stream to get
|
282
|
+
// uniformly distributed elements. This is used for matrix expansion and only
|
283
|
+
// operates on public inputs.
|
284
|
+
static void scalar_from_keccak_vartime(scalar *out,
|
285
|
+
struct BORINGSSL_keccak_st *keccak_ctx) {
|
286
|
+
uint8_t bytes[3];
|
287
|
+
for (int i = 0; i < DEGREE;) {
|
288
|
+
BORINGSSL_keccak_squeeze(keccak_ctx, bytes, sizeof(bytes));
|
289
|
+
uint16_t d1 = bytes[0] + 256 * (bytes[1] % 16);
|
290
|
+
uint16_t d2 = bytes[1] / 16 + 16 * bytes[2];
|
291
|
+
if (d1 < kPrime) {
|
292
|
+
out->c[i++] = d1;
|
293
|
+
}
|
294
|
+
if (d2 < kPrime && i < DEGREE) {
|
295
|
+
out->c[i++] = d2;
|
296
|
+
}
|
297
|
+
}
|
298
|
+
}
|
299
|
+
|
300
|
+
// Algorithm 2 of the Kyber spec, with eta fixed to two and the PRF call
|
301
|
+
// included. Creates binominally distributed elements by sampling 2*|eta| bits,
|
302
|
+
// and setting the coefficient to the count of the first bits minus the count of
|
303
|
+
// the second bits, resulting in a centered binomial distribution. Since eta is
|
304
|
+
// two this gives -2/2 with a probability of 1/16, -1/1 with probability 1/4,
|
305
|
+
// and 0 with probability 3/8.
|
306
|
+
static void scalar_centered_binomial_distribution_eta_2_with_prf(
|
307
|
+
scalar *out, const uint8_t input[33]) {
|
308
|
+
uint8_t entropy[128];
|
309
|
+
static_assert(sizeof(entropy) == 2 * /*kEta=*/2 * DEGREE / 8, "");
|
310
|
+
BORINGSSL_keccak(entropy, sizeof(entropy), input, 33, boringssl_shake256);
|
311
|
+
|
312
|
+
for (int i = 0; i < DEGREE; i += 2) {
|
313
|
+
uint8_t byte = entropy[i / 2];
|
314
|
+
|
315
|
+
uint16_t value = kPrime;
|
316
|
+
value += (byte & 1) + ((byte >> 1) & 1);
|
317
|
+
value -= ((byte >> 2) & 1) + ((byte >> 3) & 1);
|
318
|
+
out->c[i] = reduce_once(value);
|
319
|
+
|
320
|
+
byte >>= 4;
|
321
|
+
value = kPrime;
|
322
|
+
value += (byte & 1) + ((byte >> 1) & 1);
|
323
|
+
value -= ((byte >> 2) & 1) + ((byte >> 3) & 1);
|
324
|
+
out->c[i + 1] = reduce_once(value);
|
325
|
+
}
|
326
|
+
}
|
327
|
+
|
328
|
+
// Generates a secret vector by using
|
329
|
+
// |scalar_centered_binomial_distribution_eta_2_with_prf|, using the given seed
|
330
|
+
// appending and incrementing |counter| for entry of the vector.
|
331
|
+
static void vector_generate_secret_eta_2(vector *out, uint8_t *counter,
|
332
|
+
const uint8_t seed[32]) {
|
333
|
+
uint8_t input[33];
|
334
|
+
OPENSSL_memcpy(input, seed, 32);
|
335
|
+
for (int i = 0; i < RANK; i++) {
|
336
|
+
input[32] = (*counter)++;
|
337
|
+
scalar_centered_binomial_distribution_eta_2_with_prf(&out->v[i], input);
|
338
|
+
}
|
339
|
+
}
|
340
|
+
|
341
|
+
// Expands the matrix of a seed for key generation and for encaps-CPA.
|
342
|
+
static void matrix_expand(matrix *out, const uint8_t rho[32]) {
|
343
|
+
uint8_t input[34];
|
344
|
+
OPENSSL_memcpy(input, rho, 32);
|
345
|
+
for (int i = 0; i < RANK; i++) {
|
346
|
+
for (int j = 0; j < RANK; j++) {
|
347
|
+
input[32] = i;
|
348
|
+
input[33] = j;
|
349
|
+
struct BORINGSSL_keccak_st keccak_ctx;
|
350
|
+
BORINGSSL_keccak_init(&keccak_ctx, input, sizeof(input),
|
351
|
+
boringssl_shake128);
|
352
|
+
scalar_from_keccak_vartime(&out->v[i][j], &keccak_ctx);
|
353
|
+
}
|
354
|
+
}
|
355
|
+
}
|
356
|
+
|
357
|
+
static const uint8_t kMasks[8] = {0x01, 0x03, 0x07, 0x0f,
|
358
|
+
0x1f, 0x3f, 0x7f, 0xff};
|
359
|
+
|
360
|
+
static void scalar_encode(uint8_t *out, const scalar *s, int bits) {
|
361
|
+
assert(bits <= (int)sizeof(*s->c) * 8 && bits != 1);
|
362
|
+
|
363
|
+
uint8_t out_byte = 0;
|
364
|
+
int out_byte_bits = 0;
|
365
|
+
|
366
|
+
for (int i = 0; i < DEGREE; i++) {
|
367
|
+
uint16_t element = s->c[i];
|
368
|
+
int element_bits_done = 0;
|
369
|
+
|
370
|
+
while (element_bits_done < bits) {
|
371
|
+
int chunk_bits = bits - element_bits_done;
|
372
|
+
int out_bits_remaining = 8 - out_byte_bits;
|
373
|
+
if (chunk_bits >= out_bits_remaining) {
|
374
|
+
chunk_bits = out_bits_remaining;
|
375
|
+
out_byte |= (element & kMasks[chunk_bits - 1]) << out_byte_bits;
|
376
|
+
*out = out_byte;
|
377
|
+
out++;
|
378
|
+
out_byte_bits = 0;
|
379
|
+
out_byte = 0;
|
380
|
+
} else {
|
381
|
+
out_byte |= (element & kMasks[chunk_bits - 1]) << out_byte_bits;
|
382
|
+
out_byte_bits += chunk_bits;
|
383
|
+
}
|
384
|
+
|
385
|
+
element_bits_done += chunk_bits;
|
386
|
+
element >>= chunk_bits;
|
387
|
+
}
|
388
|
+
}
|
389
|
+
|
390
|
+
if (out_byte_bits > 0) {
|
391
|
+
*out = out_byte;
|
392
|
+
}
|
393
|
+
}
|
394
|
+
|
395
|
+
// scalar_encode_1 is |scalar_encode| specialised for |bits| == 1.
|
396
|
+
static void scalar_encode_1(uint8_t out[32], const scalar *s) {
|
397
|
+
for (int i = 0; i < DEGREE; i += 8) {
|
398
|
+
uint8_t out_byte = 0;
|
399
|
+
for (int j = 0; j < 8; j++) {
|
400
|
+
out_byte |= (s->c[i + j] & 1) << j;
|
401
|
+
}
|
402
|
+
*out = out_byte;
|
403
|
+
out++;
|
404
|
+
}
|
405
|
+
}
|
406
|
+
|
407
|
+
// Encodes an entire vector into 32*|RANK|*|bits| bytes. Note that since 256
|
408
|
+
// (DEGREE) is divisible by 8, the individual vector entries will always fill a
|
409
|
+
// whole number of bytes, so we do not need to worry about bit packing here.
|
410
|
+
static void vector_encode(uint8_t *out, const vector *a, int bits) {
|
411
|
+
for (int i = 0; i < RANK; i++) {
|
412
|
+
scalar_encode(out + i * bits * DEGREE / 8, &a->v[i], bits);
|
413
|
+
}
|
414
|
+
}
|
415
|
+
|
416
|
+
// scalar_decode parses |DEGREE * bits| bits from |in| into |DEGREE| values in
|
417
|
+
// |out|. It returns one on success and zero if any parsed value is >=
|
418
|
+
// |kPrime|.
|
419
|
+
static int scalar_decode(scalar *out, const uint8_t *in, int bits) {
|
420
|
+
assert(bits <= (int)sizeof(*out->c) * 8 && bits != 1);
|
421
|
+
|
422
|
+
uint8_t in_byte = 0;
|
423
|
+
int in_byte_bits_left = 0;
|
424
|
+
|
425
|
+
for (int i = 0; i < DEGREE; i++) {
|
426
|
+
uint16_t element = 0;
|
427
|
+
int element_bits_done = 0;
|
428
|
+
|
429
|
+
while (element_bits_done < bits) {
|
430
|
+
if (in_byte_bits_left == 0) {
|
431
|
+
in_byte = *in;
|
432
|
+
in++;
|
433
|
+
in_byte_bits_left = 8;
|
434
|
+
}
|
435
|
+
|
436
|
+
int chunk_bits = bits - element_bits_done;
|
437
|
+
if (chunk_bits > in_byte_bits_left) {
|
438
|
+
chunk_bits = in_byte_bits_left;
|
439
|
+
}
|
440
|
+
|
441
|
+
element |= (in_byte & kMasks[chunk_bits - 1]) << element_bits_done;
|
442
|
+
in_byte_bits_left -= chunk_bits;
|
443
|
+
in_byte >>= chunk_bits;
|
444
|
+
|
445
|
+
element_bits_done += chunk_bits;
|
446
|
+
}
|
447
|
+
|
448
|
+
if (element >= kPrime) {
|
449
|
+
return 0;
|
450
|
+
}
|
451
|
+
out->c[i] = element;
|
452
|
+
}
|
453
|
+
|
454
|
+
return 1;
|
455
|
+
}
|
456
|
+
|
457
|
+
// scalar_decode_1 is |scalar_decode| specialised for |bits| == 1.
|
458
|
+
static void scalar_decode_1(scalar *out, const uint8_t in[32]) {
|
459
|
+
for (int i = 0; i < DEGREE; i += 8) {
|
460
|
+
uint8_t in_byte = *in;
|
461
|
+
in++;
|
462
|
+
for (int j = 0; j < 8; j++) {
|
463
|
+
out->c[i + j] = in_byte & 1;
|
464
|
+
in_byte >>= 1;
|
465
|
+
}
|
466
|
+
}
|
467
|
+
}
|
468
|
+
|
469
|
+
// Decodes 32*|RANK|*|bits| bytes from |in| into |out|. It returns one on
|
470
|
+
// success or zero if any parsed value is >= |kPrime|.
|
471
|
+
static int vector_decode(vector *out, const uint8_t *in, int bits) {
|
472
|
+
for (int i = 0; i < RANK; i++) {
|
473
|
+
if (!scalar_decode(&out->v[i], in + i * bits * DEGREE / 8, bits)) {
|
474
|
+
return 0;
|
475
|
+
}
|
476
|
+
}
|
477
|
+
return 1;
|
478
|
+
}
|
479
|
+
|
480
|
+
// Compresses (lossily) an input |x| mod 3329 into |bits| many bits by grouping
|
481
|
+
// numbers close to each other together. The formula used is
|
482
|
+
// round(2^|bits|/kPrime*x) mod 2^|bits|.
|
483
|
+
// Uses Barrett reduction to achieve constant time. Since we need both the
|
484
|
+
// remainder (for rounding) and the quotient (as the result), we cannot use
|
485
|
+
// |reduce| here, but need to do the Barrett reduction directly.
|
486
|
+
static uint16_t compress(uint16_t x, int bits) {
|
487
|
+
uint32_t product = (uint32_t)x << bits;
|
488
|
+
uint32_t quotient = ((uint64_t)product * kBarrettMultiplier) >> kBarrettShift;
|
489
|
+
uint32_t remainder = product - quotient * kPrime;
|
490
|
+
|
491
|
+
// Adjust the quotient to round correctly:
|
492
|
+
// 0 <= remainder <= kHalfPrime round to 0
|
493
|
+
// kHalfPrime < remainder <= kPrime + kHalfPrime round to 1
|
494
|
+
// kPrime + kHalfPrime < remainder < 2 * kPrime round to 2
|
495
|
+
assert(remainder < 2u * kPrime);
|
496
|
+
quotient += 1 & constant_time_lt_w(kHalfPrime, remainder);
|
497
|
+
quotient += 1 & constant_time_lt_w(kPrime + kHalfPrime, remainder);
|
498
|
+
return quotient & ((1 << bits) - 1);
|
499
|
+
}
|
500
|
+
|
501
|
+
// Decompresses |x| by using an equi-distant representative. The formula is
|
502
|
+
// round(kPrime/2^|bits|*x). Note that 2^|bits| being the divisor allows us to
|
503
|
+
// implement this logic using only bit operations.
|
504
|
+
static uint16_t decompress(uint16_t x, int bits) {
|
505
|
+
uint32_t product = (uint32_t)x * kPrime;
|
506
|
+
uint32_t power = 1 << bits;
|
507
|
+
// This is |product| % power, since |power| is a power of 2.
|
508
|
+
uint32_t remainder = product & (power - 1);
|
509
|
+
// This is |product| / power, since |power| is a power of 2.
|
510
|
+
uint32_t lower = product >> bits;
|
511
|
+
// The rounding logic works since the first half of numbers mod |power| have a
|
512
|
+
// 0 as first bit, and the second half has a 1 as first bit, since |power| is
|
513
|
+
// a power of 2. As a 12 bit number, |remainder| is always positive, so we
|
514
|
+
// will shift in 0s for a right shift.
|
515
|
+
return lower + (remainder >> (bits - 1));
|
516
|
+
}
|
517
|
+
|
518
|
+
static void scalar_compress(scalar *s, int bits) {
|
519
|
+
for (int i = 0; i < DEGREE; i++) {
|
520
|
+
s->c[i] = compress(s->c[i], bits);
|
521
|
+
}
|
522
|
+
}
|
523
|
+
|
524
|
+
static void scalar_decompress(scalar *s, int bits) {
|
525
|
+
for (int i = 0; i < DEGREE; i++) {
|
526
|
+
s->c[i] = decompress(s->c[i], bits);
|
527
|
+
}
|
528
|
+
}
|
529
|
+
|
530
|
+
static void vector_compress(vector *a, int bits) {
|
531
|
+
for (int i = 0; i < RANK; i++) {
|
532
|
+
scalar_compress(&a->v[i], bits);
|
533
|
+
}
|
534
|
+
}
|
535
|
+
|
536
|
+
static void vector_decompress(vector *a, int bits) {
|
537
|
+
for (int i = 0; i < RANK; i++) {
|
538
|
+
scalar_decompress(&a->v[i], bits);
|
539
|
+
}
|
540
|
+
}
|
541
|
+
|
542
|
+
struct public_key {
|
543
|
+
vector t;
|
544
|
+
uint8_t rho[32];
|
545
|
+
uint8_t public_key_hash[32];
|
546
|
+
matrix m;
|
547
|
+
};
|
548
|
+
|
549
|
+
static struct public_key *public_key_from_external(
|
550
|
+
const struct KYBER_public_key *external) {
|
551
|
+
static_assert(sizeof(struct KYBER_public_key) >= sizeof(struct public_key),
|
552
|
+
"Kyber public key is too small");
|
553
|
+
static_assert(alignof(struct KYBER_public_key) >= alignof(struct public_key),
|
554
|
+
"Kyber public key align incorrect");
|
555
|
+
return (struct public_key *)external;
|
556
|
+
}
|
557
|
+
|
558
|
+
struct private_key {
|
559
|
+
struct public_key pub;
|
560
|
+
vector s;
|
561
|
+
uint8_t fo_failure_secret[32];
|
562
|
+
};
|
563
|
+
|
564
|
+
static struct private_key *private_key_from_external(
|
565
|
+
const struct KYBER_private_key *external) {
|
566
|
+
static_assert(sizeof(struct KYBER_private_key) >= sizeof(struct private_key),
|
567
|
+
"Kyber private key too small");
|
568
|
+
static_assert(
|
569
|
+
alignof(struct KYBER_private_key) >= alignof(struct private_key),
|
570
|
+
"Kyber private key align incorrect");
|
571
|
+
return (struct private_key *)external;
|
572
|
+
}
|
573
|
+
|
574
|
+
// Calls |KYBER_generate_key_external_entropy| with random bytes from
|
575
|
+
// |RAND_bytes|.
|
576
|
+
void KYBER_generate_key(uint8_t out_encoded_public_key[KYBER_PUBLIC_KEY_BYTES],
|
577
|
+
struct KYBER_private_key *out_private_key) {
|
578
|
+
uint8_t entropy[KYBER_GENERATE_KEY_ENTROPY];
|
579
|
+
RAND_bytes(entropy, sizeof(entropy));
|
580
|
+
KYBER_generate_key_external_entropy(out_encoded_public_key, out_private_key,
|
581
|
+
entropy);
|
582
|
+
}
|
583
|
+
|
584
|
+
static int kyber_marshal_public_key(CBB *out, const struct public_key *pub) {
|
585
|
+
uint8_t *vector_output;
|
586
|
+
if (!CBB_add_space(out, &vector_output, kEncodedVectorSize)) {
|
587
|
+
return 0;
|
588
|
+
}
|
589
|
+
vector_encode(vector_output, &pub->t, kLog2Prime);
|
590
|
+
if (!CBB_add_bytes(out, pub->rho, sizeof(pub->rho))) {
|
591
|
+
return 0;
|
592
|
+
}
|
593
|
+
return 1;
|
594
|
+
}
|
595
|
+
|
596
|
+
// Algorithms 4 and 7 of the Kyber spec. Algorithms are combined since key
|
597
|
+
// generation is not part of the FO transform, and the spec uses Algorithm 7 to
|
598
|
+
// specify the actual key format.
|
599
|
+
void KYBER_generate_key_external_entropy(
|
600
|
+
uint8_t out_encoded_public_key[KYBER_PUBLIC_KEY_BYTES],
|
601
|
+
struct KYBER_private_key *out_private_key,
|
602
|
+
const uint8_t entropy[KYBER_GENERATE_KEY_ENTROPY]) {
|
603
|
+
struct private_key *priv = private_key_from_external(out_private_key);
|
604
|
+
uint8_t hashed[64];
|
605
|
+
BORINGSSL_keccak(hashed, sizeof(hashed), entropy, 32, boringssl_sha3_512);
|
606
|
+
const uint8_t *const rho = hashed;
|
607
|
+
const uint8_t *const sigma = hashed + 32;
|
608
|
+
OPENSSL_memcpy(priv->pub.rho, hashed, sizeof(priv->pub.rho));
|
609
|
+
matrix_expand(&priv->pub.m, rho);
|
610
|
+
uint8_t counter = 0;
|
611
|
+
vector_generate_secret_eta_2(&priv->s, &counter, sigma);
|
612
|
+
vector_ntt(&priv->s);
|
613
|
+
vector error;
|
614
|
+
vector_generate_secret_eta_2(&error, &counter, sigma);
|
615
|
+
vector_ntt(&error);
|
616
|
+
matrix_mult_transpose(&priv->pub.t, &priv->pub.m, &priv->s);
|
617
|
+
vector_add(&priv->pub.t, &error);
|
618
|
+
|
619
|
+
CBB cbb;
|
620
|
+
CBB_init_fixed(&cbb, out_encoded_public_key, KYBER_PUBLIC_KEY_BYTES);
|
621
|
+
if (!kyber_marshal_public_key(&cbb, &priv->pub)) {
|
622
|
+
abort();
|
623
|
+
}
|
624
|
+
|
625
|
+
BORINGSSL_keccak(priv->pub.public_key_hash, sizeof(priv->pub.public_key_hash),
|
626
|
+
out_encoded_public_key, KYBER_PUBLIC_KEY_BYTES,
|
627
|
+
boringssl_sha3_256);
|
628
|
+
OPENSSL_memcpy(priv->fo_failure_secret, entropy + 32, 32);
|
629
|
+
}
|
630
|
+
|
631
|
+
void KYBER_public_from_private(struct KYBER_public_key *out_public_key,
|
632
|
+
const struct KYBER_private_key *private_key) {
|
633
|
+
struct public_key *const pub = public_key_from_external(out_public_key);
|
634
|
+
const struct private_key *const priv = private_key_from_external(private_key);
|
635
|
+
*pub = priv->pub;
|
636
|
+
}
|
637
|
+
|
638
|
+
// Algorithm 5 of the Kyber spec. Encrypts a message with given randomness to
|
639
|
+
// the ciphertext in |out|. Without applying the Fujisaki-Okamoto transform this
|
640
|
+
// would not result in a CCA secure scheme, since lattice schemes are vulnerable
|
641
|
+
// to decryption failure oracles.
|
642
|
+
static void encrypt_cpa(uint8_t out[KYBER_CIPHERTEXT_BYTES],
|
643
|
+
const struct public_key *pub, const uint8_t message[32],
|
644
|
+
const uint8_t randomness[32]) {
|
645
|
+
uint8_t counter = 0;
|
646
|
+
vector secret;
|
647
|
+
vector_generate_secret_eta_2(&secret, &counter, randomness);
|
648
|
+
vector_ntt(&secret);
|
649
|
+
vector error;
|
650
|
+
vector_generate_secret_eta_2(&error, &counter, randomness);
|
651
|
+
uint8_t input[33];
|
652
|
+
OPENSSL_memcpy(input, randomness, 32);
|
653
|
+
input[32] = counter;
|
654
|
+
scalar scalar_error;
|
655
|
+
scalar_centered_binomial_distribution_eta_2_with_prf(&scalar_error, input);
|
656
|
+
vector u;
|
657
|
+
matrix_mult(&u, &pub->m, &secret);
|
658
|
+
vector_inverse_ntt(&u);
|
659
|
+
vector_add(&u, &error);
|
660
|
+
scalar v;
|
661
|
+
scalar_inner_product(&v, &pub->t, &secret);
|
662
|
+
scalar_inverse_ntt(&v);
|
663
|
+
scalar_add(&v, &scalar_error);
|
664
|
+
scalar expanded_message;
|
665
|
+
scalar_decode_1(&expanded_message, message);
|
666
|
+
scalar_decompress(&expanded_message, 1);
|
667
|
+
scalar_add(&v, &expanded_message);
|
668
|
+
vector_compress(&u, kDU);
|
669
|
+
vector_encode(out, &u, kDU);
|
670
|
+
scalar_compress(&v, kDV);
|
671
|
+
scalar_encode(out + kCompressedVectorSize, &v, kDV);
|
672
|
+
}
|
673
|
+
|
674
|
+
// Calls KYBER_encap_external_entropy| with random bytes from |RAND_bytes|
|
675
|
+
void KYBER_encap(uint8_t out_ciphertext[KYBER_CIPHERTEXT_BYTES],
|
676
|
+
uint8_t *out_shared_secret, size_t out_shared_secret_len,
|
677
|
+
const struct KYBER_public_key *public_key) {
|
678
|
+
uint8_t entropy[KYBER_ENCAP_ENTROPY];
|
679
|
+
RAND_bytes(entropy, KYBER_ENCAP_ENTROPY);
|
680
|
+
KYBER_encap_external_entropy(out_ciphertext, out_shared_secret,
|
681
|
+
out_shared_secret_len, public_key, entropy);
|
682
|
+
}
|
683
|
+
|
684
|
+
// Algorithm 8 of the Kyber spec, safe for line 2 of the spec. The spec there
|
685
|
+
// hashes the output of the system's random number generator, since the FO
|
686
|
+
// transform will reveal it to the decrypting party. There is no reason to do
|
687
|
+
// this when a secure random number generator is used. When an insecure random
|
688
|
+
// number generator is used, the caller should switch to a secure one before
|
689
|
+
// calling this method.
|
690
|
+
void KYBER_encap_external_entropy(
|
691
|
+
uint8_t out_ciphertext[KYBER_CIPHERTEXT_BYTES], uint8_t *out_shared_secret,
|
692
|
+
size_t out_shared_secret_len, const struct KYBER_public_key *public_key,
|
693
|
+
const uint8_t entropy[KYBER_ENCAP_ENTROPY]) {
|
694
|
+
const struct public_key *pub = public_key_from_external(public_key);
|
695
|
+
uint8_t input[64];
|
696
|
+
OPENSSL_memcpy(input, entropy, KYBER_ENCAP_ENTROPY);
|
697
|
+
OPENSSL_memcpy(input + KYBER_ENCAP_ENTROPY, pub->public_key_hash,
|
698
|
+
sizeof(input) - KYBER_ENCAP_ENTROPY);
|
699
|
+
uint8_t prekey_and_randomness[64];
|
700
|
+
BORINGSSL_keccak(prekey_and_randomness, sizeof(prekey_and_randomness), input,
|
701
|
+
sizeof(input), boringssl_sha3_512);
|
702
|
+
encrypt_cpa(out_ciphertext, pub, entropy, prekey_and_randomness + 32);
|
703
|
+
BORINGSSL_keccak(prekey_and_randomness + 32, 32, out_ciphertext,
|
704
|
+
KYBER_CIPHERTEXT_BYTES, boringssl_sha3_256);
|
705
|
+
BORINGSSL_keccak(out_shared_secret, out_shared_secret_len,
|
706
|
+
prekey_and_randomness, sizeof(prekey_and_randomness),
|
707
|
+
boringssl_shake256);
|
708
|
+
}
|
709
|
+
|
710
|
+
// Algorithm 6 of the Kyber spec.
|
711
|
+
static void decrypt_cpa(uint8_t out[32], const struct private_key *priv,
|
712
|
+
const uint8_t ciphertext[KYBER_CIPHERTEXT_BYTES]) {
|
713
|
+
vector u;
|
714
|
+
vector_decode(&u, ciphertext, kDU);
|
715
|
+
vector_decompress(&u, kDU);
|
716
|
+
vector_ntt(&u);
|
717
|
+
scalar v;
|
718
|
+
scalar_decode(&v, ciphertext + kCompressedVectorSize, kDV);
|
719
|
+
scalar_decompress(&v, kDV);
|
720
|
+
scalar mask;
|
721
|
+
scalar_inner_product(&mask, &priv->s, &u);
|
722
|
+
scalar_inverse_ntt(&mask);
|
723
|
+
scalar_sub(&v, &mask);
|
724
|
+
scalar_compress(&v, 1);
|
725
|
+
scalar_encode_1(out, &v);
|
726
|
+
}
|
727
|
+
|
728
|
+
// Algorithm 9 of the Kyber spec, performing the FO transform by running
|
729
|
+
// encrypt_cpa on the decrypted message. The spec does not allow the decryption
|
730
|
+
// failure to be passed on to the caller, and instead returns a result that is
|
731
|
+
// deterministic but unpredictable to anyone without knowledge of the private
|
732
|
+
// key.
|
733
|
+
void KYBER_decap(uint8_t *out_shared_secret, size_t out_shared_secret_len,
|
734
|
+
const uint8_t ciphertext[KYBER_CIPHERTEXT_BYTES],
|
735
|
+
const struct KYBER_private_key *private_key) {
|
736
|
+
const struct private_key *priv = private_key_from_external(private_key);
|
737
|
+
uint8_t decrypted[64];
|
738
|
+
decrypt_cpa(decrypted, priv, ciphertext);
|
739
|
+
OPENSSL_memcpy(decrypted + 32, priv->pub.public_key_hash,
|
740
|
+
sizeof(decrypted) - 32);
|
741
|
+
uint8_t prekey_and_randomness[64];
|
742
|
+
BORINGSSL_keccak(prekey_and_randomness, sizeof(prekey_and_randomness),
|
743
|
+
decrypted, sizeof(decrypted), boringssl_sha3_512);
|
744
|
+
uint8_t expected_ciphertext[KYBER_CIPHERTEXT_BYTES];
|
745
|
+
encrypt_cpa(expected_ciphertext, &priv->pub, decrypted,
|
746
|
+
prekey_and_randomness + 32);
|
747
|
+
uint8_t mask =
|
748
|
+
constant_time_eq_int_8(CRYPTO_memcmp(ciphertext, expected_ciphertext,
|
749
|
+
sizeof(expected_ciphertext)),
|
750
|
+
0);
|
751
|
+
uint8_t input[64];
|
752
|
+
for (int i = 0; i < 32; i++) {
|
753
|
+
input[i] = constant_time_select_8(mask, prekey_and_randomness[i],
|
754
|
+
priv->fo_failure_secret[i]);
|
755
|
+
}
|
756
|
+
BORINGSSL_keccak(input + 32, 32, ciphertext, KYBER_CIPHERTEXT_BYTES,
|
757
|
+
boringssl_sha3_256);
|
758
|
+
BORINGSSL_keccak(out_shared_secret, out_shared_secret_len, input,
|
759
|
+
sizeof(input), boringssl_shake256);
|
760
|
+
}
|
761
|
+
|
762
|
+
int KYBER_marshal_public_key(CBB *out,
|
763
|
+
const struct KYBER_public_key *public_key) {
|
764
|
+
return kyber_marshal_public_key(out, public_key_from_external(public_key));
|
765
|
+
}
|
766
|
+
|
767
|
+
// kyber_parse_public_key_no_hash parses |in| into |pub| but doesn't calculate
|
768
|
+
// the value of |pub->public_key_hash|.
|
769
|
+
static int kyber_parse_public_key_no_hash(struct public_key *pub, CBS *in) {
|
770
|
+
CBS t_bytes;
|
771
|
+
if (!CBS_get_bytes(in, &t_bytes, kEncodedVectorSize) ||
|
772
|
+
!vector_decode(&pub->t, CBS_data(&t_bytes), kLog2Prime) ||
|
773
|
+
!CBS_copy_bytes(in, pub->rho, sizeof(pub->rho))) {
|
774
|
+
return 0;
|
775
|
+
}
|
776
|
+
matrix_expand(&pub->m, pub->rho);
|
777
|
+
return 1;
|
778
|
+
}
|
779
|
+
|
780
|
+
int KYBER_parse_public_key(struct KYBER_public_key *public_key, CBS *in) {
|
781
|
+
struct public_key *pub = public_key_from_external(public_key);
|
782
|
+
CBS orig_in = *in;
|
783
|
+
if (!kyber_parse_public_key_no_hash(pub, in) || //
|
784
|
+
CBS_len(in) != 0) {
|
785
|
+
return 0;
|
786
|
+
}
|
787
|
+
BORINGSSL_keccak(pub->public_key_hash, sizeof(pub->public_key_hash),
|
788
|
+
CBS_data(&orig_in), CBS_len(&orig_in), boringssl_sha3_256);
|
789
|
+
return 1;
|
790
|
+
}
|
791
|
+
|
792
|
+
int KYBER_marshal_private_key(CBB *out,
|
793
|
+
const struct KYBER_private_key *private_key) {
|
794
|
+
const struct private_key *const priv = private_key_from_external(private_key);
|
795
|
+
uint8_t *s_output;
|
796
|
+
if (!CBB_add_space(out, &s_output, kEncodedVectorSize)) {
|
797
|
+
return 0;
|
798
|
+
}
|
799
|
+
vector_encode(s_output, &priv->s, kLog2Prime);
|
800
|
+
if (!kyber_marshal_public_key(out, &priv->pub) ||
|
801
|
+
!CBB_add_bytes(out, priv->pub.public_key_hash,
|
802
|
+
sizeof(priv->pub.public_key_hash)) ||
|
803
|
+
!CBB_add_bytes(out, priv->fo_failure_secret,
|
804
|
+
sizeof(priv->fo_failure_secret))) {
|
805
|
+
return 0;
|
806
|
+
}
|
807
|
+
return 1;
|
808
|
+
}
|
809
|
+
|
810
|
+
int KYBER_parse_private_key(struct KYBER_private_key *out_private_key,
|
811
|
+
CBS *in) {
|
812
|
+
struct private_key *const priv = private_key_from_external(out_private_key);
|
813
|
+
|
814
|
+
CBS s_bytes;
|
815
|
+
if (!CBS_get_bytes(in, &s_bytes, kEncodedVectorSize) ||
|
816
|
+
!vector_decode(&priv->s, CBS_data(&s_bytes), kLog2Prime) ||
|
817
|
+
!kyber_parse_public_key_no_hash(&priv->pub, in) ||
|
818
|
+
!CBS_copy_bytes(in, priv->pub.public_key_hash,
|
819
|
+
sizeof(priv->pub.public_key_hash)) ||
|
820
|
+
!CBS_copy_bytes(in, priv->fo_failure_secret,
|
821
|
+
sizeof(priv->fo_failure_secret)) ||
|
822
|
+
CBS_len(in) != 0) {
|
823
|
+
return 0;
|
824
|
+
}
|
825
|
+
return 1;
|
826
|
+
}
|